Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update dependencies before Dex v2.41 #3637

Merged
merged 1 commit into from
Jul 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .github/workflows/artifacts.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -200,11 +200,12 @@ jobs:
output: trivy-results.sarif

- name: Upload Trivy scan results as artifact
uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 # v3.1.3
uses: actions/upload-artifact@0b2256b8c012f0828dc542b3febcab082c67f72b # v4.3.4
with:
name: "[${{ github.job }}] Trivy scan results"
path: trivy-results.sarif
retention-days: 5
overwrite: true

- name: Upload Trivy scan results to GitHub Security tab
uses: github/codeql-action/upload-sarif@4fa2a7953630fd2f3fb380f21be14ede0169dd4f # v3.25.12
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ ARG BASE_IMAGE=alpine

FROM --platform=$BUILDPLATFORM tonistiigi/xx:1.4.0@sha256:0cd3f05c72d6c9b038eb135f91376ee1169ef3a330d34e418e65e2a5c2e9c0d4 AS xx

FROM --platform=$BUILDPLATFORM golang:1.22.3-alpine3.18@sha256:d1a601b64de09e2fa38c95e55838961811d5ca11062a8f4230a5c434b3ae2a34 AS builder
FROM --platform=$BUILDPLATFORM golang:1.22.5-alpine3.20@sha256:8c9183f715b0b4eca05b8b3dbf59766aaedb41ec07477b132ee2891ac0110a07 AS builder

COPY --from=xx / /

Expand Down
14 changes: 7 additions & 7 deletions api/v2/go.mod
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
module github.com/dexidp/dex/api/v2

go 1.17
go 1.21

require (
google.golang.org/grpc v1.64.0
google.golang.org/protobuf v1.34.1
google.golang.org/grpc v1.65.0
google.golang.org/protobuf v1.34.2
)

require (
golang.org/x/net v0.23.0 // indirect
golang.org/x/sys v0.18.0 // indirect
golang.org/x/text v0.14.0 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20240318140521-94a12d6c2237 // indirect
golang.org/x/net v0.26.0 // indirect
golang.org/x/sys v0.21.0 // indirect
golang.org/x/text v0.16.0 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20240528184218-531527333157 // indirect
)
2,634 changes: 12 additions & 2,622 deletions api/v2/go.sum

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion connector/google/google.go
Original file line number Diff line number Diff line change
Expand Up @@ -399,7 +399,7 @@ func getCredentialsFromDefault(ctx context.Context, email string, logger *slog.L
// createServiceWithMetadataServer creates a new service using metadata server.
// If an error occurs during the process, it is returned along with a nil service.
func createServiceWithMetadataServer(ctx context.Context, adminEmail string, logger *slog.Logger) (*admin.Service, error) {
serviceAccountEmail, err := metadata.Email("default")
serviceAccountEmail, err := metadata.EmailWithContext(ctx, "default")
logger.Info("discovered serviceAccountEmail", "email", serviceAccountEmail)

if err != nil {
Expand Down
11 changes: 8 additions & 3 deletions connector/ldap/ldap.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import (
"fmt"
"log/slog"
"net"
"net/url"
"os"
"strings"

Expand Down Expand Up @@ -318,19 +319,23 @@ func (c *ldapConnector) do(_ context.Context, f func(c *ldap.Conn) error) error
conn *ldap.Conn
err error
)

switch {
case c.InsecureNoSSL:
conn, err = ldap.Dial("tcp", c.Host)
u := url.URL{Scheme: "ldap://", Host: c.Host}
conn, err = ldap.DialURL(u.String())
case c.StartTLS:
conn, err = ldap.Dial("tcp", c.Host)
u := url.URL{Scheme: "ldap://", Host: c.Host}
conn, err = ldap.DialURL(u.String())
if err != nil {
return fmt.Errorf("failed to connect: %v", err)
}
if err := conn.StartTLS(c.tlsConfig); err != nil {
return fmt.Errorf("start TLS failed: %v", err)
}
default:
conn, err = ldap.DialTLS("tcp", c.Host, c.tlsConfig)
u := url.URL{Scheme: "ldaps://", Host: c.Host}
conn, err = ldap.DialURL(u.String(), ldap.DialWithTLSConfig(c.tlsConfig))
}
if err != nil {
return fmt.Errorf("failed to connect: %v", err)
Expand Down
4 changes: 2 additions & 2 deletions examples/config-dev.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,6 @@ staticPasswords:
userID: "08a8684b-db88-4b73-90a9-3cd1661f5466"

# A list of features that extend Dex functionalities
# additionalFeatures:
# additionalFeatures:
# # allows CRUD operations on connectors through the gRPC API
# - "ConnectorsCRUD"
# - "ConnectorsCRUD"
14 changes: 7 additions & 7 deletions go.mod
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ module github.com/dexidp/dex
go 1.21

require (
cloud.google.com/go/compute/metadata v0.3.0
cloud.google.com/go/compute/metadata v0.5.0
entgo.io/ent v0.13.1
github.com/AppsFlyer/go-sundheit v0.5.0
github.com/Masterminds/semver v1.5.0
Expand All @@ -15,7 +15,7 @@ require (
github.com/fsnotify/fsnotify v1.7.0
github.com/ghodss/yaml v1.0.0
github.com/go-jose/go-jose/v4 v4.0.3
github.com/go-ldap/ldap/v3 v3.4.6
github.com/go-ldap/ldap/v3 v3.4.8
github.com/go-sql-driver/mysql v1.8.1
github.com/google/uuid v1.6.0
github.com/gorilla/handlers v1.5.2
Expand All @@ -37,14 +37,14 @@ require (
golang.org/x/exp v0.0.0-20221004215720-b9f4876ce741
golang.org/x/net v0.27.0
golang.org/x/oauth2 v0.21.0
google.golang.org/api v0.182.0
google.golang.org/api v0.188.0
google.golang.org/grpc v1.65.0
google.golang.org/protobuf v1.34.2
)

require (
ariga.io/atlas v0.19.1-0.20240203083654-5948b60a8e43 // indirect
cloud.google.com/go/auth v0.4.2 // indirect
cloud.google.com/go/auth v0.7.0 // indirect
cloud.google.com/go/auth/oauth2adapt v0.2.2 // indirect
filippo.io/edwards25519 v1.1.0 // indirect
github.com/Azure/go-ntlmssp v0.0.0-20221128193559-754e69321358 // indirect
Expand All @@ -67,7 +67,7 @@ require (
github.com/google/go-cmp v0.6.0 // indirect
github.com/google/s2a-go v0.1.7 // indirect
github.com/googleapis/enterprise-certificate-proxy v0.3.2 // indirect
github.com/googleapis/gax-go/v2 v2.12.4 // indirect
github.com/googleapis/gax-go/v2 v2.12.5 // indirect
github.com/hashicorp/hcl/v2 v2.13.0 // indirect
github.com/huandu/xstrings v1.3.3 // indirect
github.com/imdario/mergo v0.3.11 // indirect
Expand Down Expand Up @@ -96,8 +96,8 @@ require (
golang.org/x/mod v0.17.0 // indirect
golang.org/x/sys v0.22.0 // indirect
golang.org/x/text v0.16.0 // indirect
google.golang.org/genproto/googleapis/api v0.0.0-20240528184218-531527333157 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20240528184218-531527333157 // indirect
google.golang.org/genproto/googleapis/api v0.0.0-20240610135401-a8a62080eff3 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20240708141625-4ad9e859172b // indirect
gopkg.in/yaml.v2 v2.4.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
)
Expand Down
Loading
Loading