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

chore: switch to new SSO secret template #111

Merged
merged 6 commits into from
Apr 19, 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
2 changes: 1 addition & 1 deletion .yamllint
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ yaml-files:
- '.yamllint'

ignore:
- '**/charts/**/templates**'
- '**/chart/templates**'

rules:
anchors: enable
Expand Down
5 changes: 0 additions & 5 deletions bundle/uds-bundle.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -46,11 +46,6 @@ packages:
- name: GITLAB_SSO_ENABLED
description: "Boolean to enable or disable sso things"
path: "sso"
uds-gitlab-sso:
variables:
- name: GITLAB_SSO_ENABLED
description: "Boolean to enable or disable sso things"
path: "sso"
gitlab:
variables:
- name: GITLAB_SSO_ENABLED
Expand Down
1 change: 0 additions & 1 deletion bundle/uds-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ variables:
gitlab_db_endpoint: "pg-cluster.postgres.svc.cluster.local"
DISABLE_REGISTRY_REDIRECT: "true"
GITLAB_PAGES_ENABLED: true
GITLAB_SSO_ENABLED: false
# # Overrides for scaled down cluster for local dev and CI
webservice_replicas: 1
webservice_resources:
Expand Down
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,38 @@ spec:
clientId: uds-core-gitlab
redirectUris:
- "https://gitlab.{{ .Values.domain }}/users/auth/openid_connect/callback"
secretName: gitlab-sso-provider-json
secretTemplate:
# GitLab expects a providers JSON file that is documented more here: https://gitlab-org.gitlab.io/technical-writing-group/gitlab-docs-hugo/administration/auth/oidc/
# Note: the `authorization_endpoint`, `issuer`, and `userinfo_endpoint` must be the external URL
providers: |
{
"name": "openid_connect",
"label": "SSO",
"args": {
"name": "openid_connect",
"scope": [
"openid",
"profile"
],
"response_type": "code",
"issuer": "https://sso.{{ .Values.domain }}/realms/uds",
"client_auth_method": "query",
"discovery": false,
"uid_field": "preferred_username",
"pkce": "true",
"client_options": {
"identifier": "clientField(clientId)",
"secret": "clientField(secret)",
"redirect_uri": "clientField(redirectUris)[0]",
"end_session_endpoint": "http://keycloak-http.keycloak.svc.cluster.local:8080/realms/uds/protocol/openid-connect/logout",
"authorization_endpoint": "https://sso.{{ .Values.domain }}/realms/uds/protocol/openid-connect/auth",
"token_endpoint": "http://keycloak-http.keycloak.svc.cluster.local:8080/realms/uds/protocol/openid-connect/token",
"userinfo_endpoint": "https://sso.{{ .Values.domain }}/realms/uds/protocol/openid-connect/userinfo",
"jwks_uri": "http://keycloak-http.keycloak.svc.cluster.local:8080/realms/uds/protocol/openid-connect/certs"
}
}
}
{{- end }}
network:
expose:
Expand Down Expand Up @@ -188,10 +220,20 @@ spec:

# Webservice Netpols
- direction: Egress
remoteNamespace: keycloak
remoteSelector:
app.kubernetes.io/name: keycloak
selector:
app: webservice
port: 8080
description: "SSO Internal"

- direction: Egress
remoteGenerated: Anywhere
selector:
app: webservice
port: 443
description: "SSO"
description: "SSO External"

- direction: Egress
selector:
Expand Down
File renamed without changes.
23 changes: 0 additions & 23 deletions charts/sso/.helmignore

This file was deleted.

18 changes: 0 additions & 18 deletions charts/sso/Chart.yaml

This file was deleted.

54 changes: 0 additions & 54 deletions charts/sso/templates/secret.yaml

This file was deleted.

2 changes: 0 additions & 2 deletions charts/sso/values.yaml

This file was deleted.

6 changes: 1 addition & 5 deletions common/zarf.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,7 @@ components:
- name: uds-gitlab-config
namespace: gitlab
version: 0.2.0
localPath: ../charts/config
- name: uds-gitlab-sso
namespace: gitlab
version: 0.1.0
localPath: ../charts/sso
localPath: ../chart
- name: gitlab
namespace: gitlab
url: https://charts.gitlab.io/
Expand Down