Skip to content

Commit

Permalink
feat(oidc_auth): Add backend support for OIDC Auth
Browse files Browse the repository at this point in the history
Signed-off-by: deo002 <[email protected]>
  • Loading branch information
deo002 committed Dec 13, 2024
1 parent d3058ba commit c2c1235
Show file tree
Hide file tree
Showing 22 changed files with 1,586 additions and 166 deletions.
20 changes: 19 additions & 1 deletion .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,22 @@
TOKEN_HOUR_LIFESPAN=24
# Secret key to sign tokens (openssl rand -hex 32)
API_SECRET=some-random-string
READ_API_AUTHENTICATION_ENABLED=false
READ_API_AUTHENTICATION_ENABLED=false

PORT=8080

# OIDC Provider
# The URL for retrieving keys for Token Parsing
JWKS_URI=https://provider/keys

# The field in ID Token that is to be used as username
OIDC_USERNAME_KEY=employee_id

# The field in ID Token that is to be used as email
OIDC_EMAIL_KEY=mail

# The issuer url
OIDC_ISSUER=https://provider

# The field in ID Token that is used as display name
OIDC_DISPLAYNAME_KEY=display_name
4 changes: 2 additions & 2 deletions .github/workflows/api-swagger.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: '1.20'
go-version: '1.21'
check-latest: true
cache: true

Expand Down Expand Up @@ -54,7 +54,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: '1.20'
go-version: '1.21'
check-latest: true
cache: true

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: '1.20'
go-version: '1.21'
check-latest: true
cache: true

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: '1.20'
go-version: '1.21'
check-latest: true
cache: true

Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# SPDX-FileCopyrightText: 2024 Kaushlendra Pratap <[email protected]>
# SPDX-License-Identifier: GPL-2.0-only
FROM golang:1.20 AS build
FROM golang:1.21 AS build

WORKDIR /LicenseDb

Expand Down
Loading

0 comments on commit c2c1235

Please sign in to comment.