Skip to content
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
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@

[license-image]: https://img.shields.io/badge/License-GPL3.0-blue.svg

[codecov-image]: https://codecov.io/gh/ubuntu/authd/graph/badge.svg
[codecov-url]: https://codecov.io/gh/ubuntu/authd
[codecov-image]: https://codecov.io/gh/canonical/authd/graph/badge.svg
[codecov-url]: https://codecov.io/gh/canonical/authd

[reference-documentation-image]: https://pkg.go.dev/badge/github.com/canonical/authd.svg
[reference-documentation-url]: https://pkg.go.dev/github.com/canonical/authd
Expand Down
2 changes: 1 addition & 1 deletion authd-oidc-brokers/cmd/authd-oidc/daemon/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ import (
"strings"

"github.com/canonical/authd/authd-oidc-brokers/internal/consts"
"github.com/canonical/authd/log"
"github.com/spf13/cobra"
"github.com/spf13/viper"
"github.com/ubuntu/authd/log"
"github.com/ubuntu/decorate"
)

Expand Down
2 changes: 1 addition & 1 deletion authd-oidc-brokers/cmd/authd-oidc/daemon/daemon.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ import (
"github.com/canonical/authd/authd-oidc-brokers/internal/consts"
"github.com/canonical/authd/authd-oidc-brokers/internal/daemon"
"github.com/canonical/authd/authd-oidc-brokers/internal/dbusservice"
log "github.com/canonical/authd/log"
"github.com/spf13/cobra"
"github.com/spf13/viper"
log "github.com/ubuntu/authd/log"
)

// App encapsulate commands and options of the daemon, which can be controlled by env variables and config files.
Expand Down
2 changes: 1 addition & 1 deletion authd-oidc-brokers/cmd/authd-oidc/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import (
"github.com/canonical/authd/authd-oidc-brokers/cmd/authd-oidc/daemon"
"github.com/canonical/authd/authd-oidc-brokers/internal/consts"
"github.com/canonical/authd/authd-oidc-brokers/po"
"github.com/ubuntu/authd/log"
"github.com/canonical/authd/log"
"github.com/ubuntu/go-i18n"
)

Expand Down
4 changes: 2 additions & 2 deletions authd-oidc-brokers/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ toolchain go1.25.8

require (
github.com/Azure/azure-sdk-for-go/sdk/azcore v1.21.0
github.com/canonical/authd v0.6.1
github.com/coreos/go-oidc/v3 v3.17.0
github.com/coreos/go-systemd v0.0.0-20191104093116-d3cd4ed1dbcf
github.com/go-jose/go-jose/v4 v4.1.3
Expand All @@ -20,7 +21,6 @@ require (
github.com/spf13/cobra v1.10.2
github.com/spf13/viper v1.21.0
github.com/stretchr/testify v1.11.1
github.com/ubuntu/authd v0.5.10
github.com/ubuntu/decorate v0.0.0-20240301153420-5015d6dbc8e5
github.com/ubuntu/go-i18n v0.0.0-20231113092927-594c1754ca47
golang.org/x/crypto v0.49.0
Expand All @@ -31,7 +31,7 @@ require (

require (
github.com/Azure/azure-sdk-for-go/sdk/internal v1.11.2 // indirect
github.com/coreos/go-systemd/v22 v22.5.0 // indirect
github.com/coreos/go-systemd/v22 v22.7.0 // indirect
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect
github.com/fsnotify/fsnotify v1.9.0 // indirect
github.com/go-logr/logr v1.4.3 // indirect
Expand Down
9 changes: 4 additions & 5 deletions authd-oidc-brokers/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,14 @@ github.com/Azure/azure-sdk-for-go/sdk/azcore v1.21.0 h1:fou+2+WFTib47nS+nz/ozhEB
github.com/Azure/azure-sdk-for-go/sdk/azcore v1.21.0/go.mod h1:t76Ruy8AHvUAC8GfMWJMa0ElSbuIcO03NLpynfbgsPA=
github.com/Azure/azure-sdk-for-go/sdk/internal v1.11.2 h1:9iefClla7iYpfYWdzPCRDozdmndjTm8DXdpCzPajMgA=
github.com/Azure/azure-sdk-for-go/sdk/internal v1.11.2/go.mod h1:XtLgD3ZD34DAaVIIAyG3objl5DynM3CQ/vMcbBNJZGI=
github.com/canonical/authd v0.6.1 h1:kzSi7k2CRY8AB73gg9uB5EgZ6NWpy8KQK4vSoiBwikI=
github.com/canonical/authd v0.6.1/go.mod h1:1qc5kb7RPsMkS4USZWiQU8p9801mWY5DvN7E8xo3TEo=
github.com/coreos/go-oidc/v3 v3.17.0 h1:hWBGaQfbi0iVviX4ibC7bk8OKT5qNr4klBaCHVNvehc=
github.com/coreos/go-oidc/v3 v3.17.0/go.mod h1:wqPbKFrVnE90vty060SB40FCJ8fTHTxSwyXJqZH+sI8=
github.com/coreos/go-systemd v0.0.0-20191104093116-d3cd4ed1dbcf h1:iW4rZ826su+pqaw19uhpSCzhj44qo35pNgKFGqzDKkU=
github.com/coreos/go-systemd v0.0.0-20191104093116-d3cd4ed1dbcf/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4=
github.com/coreos/go-systemd/v22 v22.5.0 h1:RrqgGjYQKalulkV8NGVIfkXQf6YYmOyiJKk8iXXhfZs=
github.com/coreos/go-systemd/v22 v22.5.0/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc=
github.com/coreos/go-systemd/v22 v22.7.0 h1:LAEzFkke61DFROc7zNLX/WA2i5J8gYqe0rSj9KI28KA=
github.com/coreos/go-systemd/v22 v22.7.0/go.mod h1:xNUYtjHu2EDXbsxz1i41wouACIwT7Ybq9o0BQhMwD0w=
github.com/cpuguy83/go-md2man/v2 v2.0.6/go.mod h1:oOW0eioCTA6cOiMLiUPZOpcVxMig6NIQQ7OS05n1F4g=
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
Expand All @@ -26,7 +28,6 @@ github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag=
github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE=
github.com/go-viper/mapstructure/v2 v2.4.0 h1:EBsztssimR/CONLSZZ04E8qAkxNYq4Qp9LvH92wZUgs=
github.com/go-viper/mapstructure/v2 v2.4.0/go.mod h1:oJDH3BJKyqBA2TXFhDsKDGDTlndYOZ6rGS0BRZIxGhM=
github.com/godbus/dbus/v5 v5.0.4/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA=
github.com/godbus/dbus/v5 v5.2.2 h1:TUR3TgtSVDmjiXOgAAyaZbYmIeP3DPkld3jgKGV8mXQ=
github.com/godbus/dbus/v5 v5.2.2/go.mod h1:3AAv2+hPq5rdnr5txxxRwiGjPXamgoIHgz9FPBfOp3c=
github.com/golang-jwt/jwt/v5 v5.3.1 h1:kYf81DTWFe7t+1VvL7eS+jKFVWaUnK9cB1qbwn63YCY=
Expand Down Expand Up @@ -112,8 +113,6 @@ github.com/stretchr/testify v1.11.1 h1:7s2iGBzp5EwR7/aIZr8ao5+dra3wiQyKjjFuvgVKu
github.com/stretchr/testify v1.11.1/go.mod h1:wZwfW3scLgRK+23gO65QZefKpKQRnfz6sD981Nm4B6U=
github.com/subosito/gotenv v1.6.0 h1:9NlTDc1FTs4qu0DDq7AEtTPNw6SVm7uBMsUCUjABIf8=
github.com/subosito/gotenv v1.6.0/go.mod h1:Dk4QP5c2W3ibzajGcXpNraDfq2IrhjMIvMSWPKKo0FU=
github.com/ubuntu/authd v0.5.10 h1:G0KCgHxNIlmHUadpMlGHfnHIIG3A572w29iFksmKlvs=
github.com/ubuntu/authd v0.5.10/go.mod h1:cdBi1Q4sclrTvG8VzOt+delxHcgQrzsYdK2MUoRQUYk=
github.com/ubuntu/decorate v0.0.0-20240301153420-5015d6dbc8e5 h1:qO8m+4mLbo1HRpD5lfhEfr7R1PuqZvbAmjaRzYEy+tM=
github.com/ubuntu/decorate v0.0.0-20240301153420-5015d6dbc8e5/go.mod h1:PUpwIgUuCQyuCz/gwiq6WYbo7IvtXXd8JqL01ez+jZE=
github.com/ubuntu/go-i18n v0.0.0-20231113092927-594c1754ca47 h1:CA2dVorxvzdsGtszqhSjyvkrXxZi4bS52ZKvP0Ko634=
Expand Down
2 changes: 1 addition & 1 deletion authd-oidc-brokers/internal/broker/broker.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,9 @@ import (
"github.com/canonical/authd/authd-oidc-brokers/internal/providers/info"
"github.com/canonical/authd/authd-oidc-brokers/internal/providers/msentraid/himmelblau"
"github.com/canonical/authd/authd-oidc-brokers/internal/token"
"github.com/canonical/authd/log"
"github.com/coreos/go-oidc/v3/oidc"
"github.com/google/uuid"
"github.com/ubuntu/authd/log"
"github.com/ubuntu/decorate"
"golang.org/x/oauth2"
)
Expand Down
2 changes: 1 addition & 1 deletion authd-oidc-brokers/internal/broker/broker_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ import (
"github.com/canonical/authd/authd-oidc-brokers/internal/providers/info"
"github.com/canonical/authd/authd-oidc-brokers/internal/testutils"
"github.com/canonical/authd/authd-oidc-brokers/internal/testutils/golden"
"github.com/canonical/authd/log"
"github.com/stretchr/testify/require"
"github.com/ubuntu/authd/log"
"gopkg.in/yaml.v3"
)

Expand Down
2 changes: 1 addition & 1 deletion authd-oidc-brokers/internal/broker/encrypt.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
"errors"
"fmt"

"github.com/ubuntu/authd/log"
"github.com/canonical/authd/log"
)

// decodeRawSecret extract the base64 secret and try to decrypt it with the private key.
Expand Down
2 changes: 1 addition & 1 deletion authd-oidc-brokers/internal/consts/consts.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
package consts

import (
"github.com/canonical/authd/log"
"github.com/coreos/go-oidc/v3/oidc"
"github.com/ubuntu/authd/log"
)

var (
Expand Down
2 changes: 1 addition & 1 deletion authd-oidc-brokers/internal/daemon/daemon.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import (
"context"
"fmt"

"github.com/canonical/authd/log"
"github.com/coreos/go-systemd/daemon"
"github.com/ubuntu/authd/log"
"github.com/ubuntu/decorate"
)

Expand Down
2 changes: 1 addition & 1 deletion authd-oidc-brokers/internal/dbusservice/methods.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import (
"errors"

"github.com/canonical/authd/authd-oidc-brokers/internal/broker"
"github.com/canonical/authd/log"
"github.com/godbus/dbus/v5"
"github.com/ubuntu/authd/log"
)

// NewSession is the method through which the broker and the daemon will communicate once dbusInterface.NewSession is called.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import (
"strings"
"sync"

"github.com/ubuntu/authd/log"
"github.com/canonical/authd/log"
"golang.org/x/oauth2"
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import (
"strings"
"unsafe"

"github.com/ubuntu/authd/log"
"github.com/canonical/authd/log"
)

// Entra AADSTS error codes as defined in
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,13 @@ import (
providerErrors "github.com/canonical/authd/authd-oidc-brokers/internal/providers/errors"
"github.com/canonical/authd/authd-oidc-brokers/internal/providers/info"
"github.com/canonical/authd/authd-oidc-brokers/internal/providers/msentraid/himmelblau"
"github.com/canonical/authd/log"
"github.com/coreos/go-oidc/v3/oidc"
"github.com/golang-jwt/jwt/v5"
"github.com/k0kubun/pp"
msgraphsdk "github.com/microsoftgraph/msgraph-sdk-go"
msgraphauth "github.com/microsoftgraph/msgraph-sdk-go-core/authentication"
msgraphmodels "github.com/microsoftgraph/msgraph-sdk-go/models"
"github.com/ubuntu/authd/log"
"golang.org/x/oauth2"
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ import (
"github.com/canonical/authd/authd-oidc-brokers/internal/providers/msentraid/himmelblau"
"github.com/canonical/authd/authd-oidc-brokers/internal/testutils"
"github.com/canonical/authd/authd-oidc-brokers/internal/testutils/golden"
"github.com/canonical/authd/log"
"github.com/golang-jwt/jwt/v5"
"github.com/stretchr/testify/require"
"github.com/ubuntu/authd/log"
"golang.org/x/oauth2"
)

Expand Down
2 changes: 1 addition & 1 deletion authd-oidc-brokers/internal/testutils/provider.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@ import (
"github.com/canonical/authd/authd-oidc-brokers/internal/consts"
"github.com/canonical/authd/authd-oidc-brokers/internal/providers/genericprovider"
"github.com/canonical/authd/authd-oidc-brokers/internal/providers/info"
"github.com/canonical/authd/log"
"github.com/coreos/go-oidc/v3/oidc"
"github.com/go-jose/go-jose/v4"
"github.com/golang-jwt/jwt/v5"
"github.com/ubuntu/authd/log"
"golang.org/x/oauth2"
)

Expand Down
12 changes: 4 additions & 8 deletions snap/variants/google/snapcraft.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,9 @@ description: |
Explore the official documentation for installation and configuration steps, or visit the GitHub repository to
contribute or provide feedback.
icon: snap/variants/google/icon.svg
website:
- https://github.com/ubuntu/authd-oidc-brokers
- https://github.com/ubuntu/authd
issues: https://github.com/ubuntu/authd/issues
source-code: https://github.com/ubuntu/authd-oidc-brokers/tree/google
website: https://documentation.ubuntu.com/authd
issues: https://github.com/canonical/authd/issues
source-code: https://github.com/canonical/authd/tree/main/authd-oidc-brokers
adopt-info: version
grade: stable
base: core24
Expand Down Expand Up @@ -55,14 +53,12 @@ parts:
build-snaps:
- go
build-environment:
- GOFLAGS: "-tags=release"
- GOBIN: ${CRAFT_PART_INSTALL}/bin
override-build: |
go mod download all
go mod vendor
VERSION=$(craftctl get version)
export GOFLAGS="-ldflags=-X=github.com/ubuntu/authd-oidc-brokers/internal/consts.Version=${VERSION}"
go build -tags=withgoogle -o ${GOBIN}/authd-google ./cmd/authd-oidc
go build -tags=withgoogle,release -ldflags "-X=github.com/canonical/authd/authd-oidc-brokers/internal/consts.Version=${VERSION}" -o ${GOBIN}/authd-google ./cmd/authd-oidc
after:
- version
config:
Expand Down
12 changes: 4 additions & 8 deletions snap/variants/msentraid/snapcraft.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,9 @@ description: |
Explore the official documentation for installation and configuration steps, or visit the GitHub repository to
contribute or provide feedback.
icon: snap/variants/msentraid/icon.svg
website:
- https://github.com/ubuntu/authd-oidc-brokers
- https://github.com/ubuntu/authd
issues: https://github.com/ubuntu/authd/issues
source-code: https://github.com/ubuntu/authd-oidc-brokers/tree/msentraid
website: https://documentation.ubuntu.com/authd
issues: https://github.com/canonical/authd/issues
source-code: https://github.com/canonical/authd/tree/main/authd-oidc-brokers
adopt-info: version
grade: stable
base: core24
Expand Down Expand Up @@ -77,7 +75,6 @@ parts:
- libhimmelblau
- version
build-environment:
- GOFLAGS: "-tags=release"
# Add libhimmelblau to the CFLAGS and LDFLAGS so that it can be found by the Go linker.
- CGO_CFLAGS: -I${CRAFT_STAGE}/include
- CGO_LDFLAGS: -L${CRAFT_STAGE}/lib -lhimmelblau
Expand All @@ -86,8 +83,7 @@ parts:
go mod download all
go mod vendor
VERSION=$(craftctl get version)
export GOFLAGS="-ldflags=-X=github.com/ubuntu/authd-oidc-brokers/internal/consts.Version=${VERSION}"
go build -tags=withmsentraid -o ${GOBIN}/authd-msentraid ./cmd/authd-oidc
go build -tags=withmsentraid,release -ldflags "-X=github.com/canonical/authd/authd-oidc-brokers/internal/consts.Version=${VERSION}" -o ${GOBIN}/authd-msentraid ./cmd/authd-oidc
config:
source: authd-oidc-brokers/conf/
source-type: local
Expand Down
6 changes: 2 additions & 4 deletions snap/variants/oidc/snapcraft.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ description: |
icon: snap/variants/oidc/icon.svg
website: https://documentation.ubuntu.com/authd
issues: https://github.com/canonical/authd/issues
source-code: https://github.com/canonical/authd
source-code: https://github.com/canonical/authd/tree/main/authd-oidc-brokers
adopt-info: version
grade: stable
base: core24
Expand Down Expand Up @@ -53,14 +53,12 @@ parts:
build-snaps:
- go
build-environment:
- GOFLAGS: "-tags=release"
- GOBIN: ${CRAFT_PART_INSTALL}/bin
override-build: |
go mod download all
go mod vendor
VERSION=$(craftctl get version)
export GOFLAGS="-ldflags=-X=github.com/canonical/authd/authd-oidc-brokers/internal/consts.Version=${VERSION}"
go build -o ${GOBIN}/authd-oidc ./cmd/authd-oidc
go build -tags=release -ldflags "-X=github.com/canonical/authd/authd-oidc-brokers/internal/consts.Version=${VERSION}" -o ${GOBIN}/authd-oidc ./cmd/authd-oidc
after:
- version
config:
Expand Down
Loading