Enable OIDC by default (#432)

* Enable OIDC by default
This commit is contained in:
Jonas Plum
2022-09-30 21:27:43 +02:00
committed by GitHub
parent 3f6cd5b366
commit 2a6183b368
4 changed files with 2959 additions and 3080 deletions

View File

@@ -97,7 +97,7 @@ jobs:
strategy: strategy:
matrix: matrix:
test: [ tickets, templates, playbooks ] test: [ tickets, templates, playbooks ]
auth: [ simple, keycloak ] auth: [ keycloak ] # simple
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: Checkout - name: Checkout
@@ -228,7 +228,7 @@ jobs:
username: ${{ github.actor }} username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }} password: ${{ secrets.GITHUB_TOKEN }}
- name: Version - name: Version
if: github.ref != '' if: github.ref_type == 'tag' && github.ref_name != ''
run: | run: |
echo ${{ github.ref_name }} echo ${{ github.ref_name }}
echo ${{ github.ref_name }} > VERSION echo ${{ github.ref_name }} > VERSION

View File

@@ -1,5 +1,6 @@
run: run:
go: "1.18" go: "1.19"
timeout: 5m
skip-dirs: skip-dirs:
- generated - generated
linters: linters:

View File

@@ -26,10 +26,10 @@ type CLI struct {
AuthAdminUsers []string `env:"AUTH_ADMIN_USERS" help:"Username of admins"` AuthAdminUsers []string `env:"AUTH_ADMIN_USERS" help:"Username of admins"`
InitialAPIKey string `env:"INITIAL_API_KEY"` InitialAPIKey string `env:"INITIAL_API_KEY"`
SimpleAuthEnable bool `env:"SIMPLE_AUTH_ENABLE" default:"true"` // SimpleAuthEnable bool `env:"SIMPLE_AUTH_ENABLE" default:"true"`
APIKeyAuthEnable bool `env:"API_KEY_AUTH_ENABLE" default:"true"` APIKeyAuthEnable bool `env:"API_KEY_AUTH_ENABLE" default:"true"`
OIDCEnable bool `env:"OIDC_ENABLE" default:"false"` OIDCEnable bool `env:"OIDC_ENABLE" default:"true"`
OIDCIssuer string `env:"OIDC_ISSUER" required:""` OIDCIssuer string `env:"OIDC_ISSUER" required:""`
OIDCClientID string `env:"OIDC_CLIENT_ID" default:"catalyst"` OIDCClientID string `env:"OIDC_CLIENT_ID" default:"catalyst"`
OIDCClientSecret string `env:"OIDC_CLIENT_SECRET" required:""` OIDCClientSecret string `env:"OIDC_CLIENT_SECRET" required:""`
@@ -80,7 +80,7 @@ func MapConfig(cli CLI) (*catalyst.Config, error) {
InternalAddress: cli.CatalystAddress, InternalAddress: cli.CatalystAddress,
Port: cli.Port, Port: cli.Port,
Auth: &auth.Config{ Auth: &auth.Config{
SimpleAuthEnable: cli.SimpleAuthEnable, SimpleAuthEnable: false, // cli.SimpleAuthEnable,
APIKeyAuthEnable: cli.APIKeyAuthEnable, APIKeyAuthEnable: cli.APIKeyAuthEnable,
OIDCAuthEnable: cli.OIDCEnable, OIDCAuthEnable: cli.OIDCEnable,
OIDCIssuer: cli.OIDCIssuer, OIDCIssuer: cli.OIDCIssuer,

File diff suppressed because it is too large Load Diff