-
Notifications
You must be signed in to change notification settings - Fork 18
Qtodo OIDC refactor #118
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
Open
mlorenzofr
wants to merge
3
commits into
validatedpatterns:main
Choose a base branch
from
mlorenzofr:qtodo-oidc-refactor
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Qtodo OIDC refactor #118
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
10 changes: 5 additions & 5 deletions
10
charts/qtodo/templates/oidc-client-secret-external-secret.yaml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,23 +1,23 @@ | ||
| {{- if .Values.app.oidcSecret.enabled }} | ||
| {{- if .Values.app.oidc.clientSecret.enabled }} | ||
| apiVersion: "external-secrets.io/v1beta1" | ||
| kind: ExternalSecret | ||
| metadata: | ||
| name: {{ .Values.app.oidcSecret.name }} | ||
| name: {{ .Values.app.oidc.clientSecret.name }} | ||
| namespace: {{ .Release.Namespace }} | ||
| spec: | ||
| refreshInterval: 15s | ||
| secretStoreRef: | ||
| name: {{ .Values.global.secretStore.name }} | ||
| kind: {{ .Values.global.secretStore.kind }} | ||
| target: | ||
| name: {{ .Values.app.oidcSecret.name }} | ||
| name: {{ .Values.app.oidc.clientSecret.name }} | ||
| template: | ||
| type: Opaque | ||
| data: | ||
| client-secret: "{{ `{{ .client_secret }}` }}" | ||
| client-secret: "{{ `{{ .client_secret | trim }}` }}" | ||
| data: | ||
| - secretKey: client_secret | ||
| remoteRef: | ||
| key: {{ .Values.app.oidcSecret.vaultPath }} | ||
| key: {{ .Values.app.oidc.clientSecret.vaultPath }} | ||
| property: client-secret | ||
| {{- end }} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,81 @@ | ||
| # Azure Entra ID integration | ||
|
|
||
| This document describes the steps required to integrate the **Zero Trust Validated Pattern** (ZTVP) with **Azure Entra ID**, trusting this service as the Identity Provider for the following components: | ||
|
|
||
| * Qtodo demo application | ||
| * Red Hat Trusted Artifact Signer (RHTAS) | ||
| * Red Hat Trusted Profile Analyzer (RHTPA) | ||
|
|
||
| ## Configuration | ||
|
|
||
| To configure the components we will need access to Azure Portal with permissions to create App Registrations and a Microsoft Entra ID tenant. | ||
|
|
||
| ### Qtodo | ||
|
|
||
| #### Azure setup | ||
|
|
||
| 1. Go to [Azure Portal](https://portal.azure.com) | ||
| 2. Navigate to **Microsoft Entra ID** | ||
| 3. Click **App registrations** in the left menu | ||
| 4. Click **New registration** | ||
| 5. Fill in the details: | ||
| * **Name**: `qtodo` | ||
| * **Supported account types**: Choose based on your needs | ||
| * **Single tenant**: Only users in your organization | ||
| * **Multi-tenant**: Users from any organization | ||
| * **Redirect URI**: Add the URL of the qtodo application here (for example `https://qtodo-qtodo.apps.ztvp.example.com`)/ | ||
| 6. Click **Register** | ||
|
|
||
| After the creation, you will see the _Overview_ page: | ||
|
|
||
| * **Application (client) ID**: `xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx` | ||
| * **Directory (tenant) ID**: `xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx` | ||
|
|
||
| **Save these values** - you will need them later. | ||
|
|
||
| Let's create a new secret for our app: | ||
|
|
||
| 1. Click **Certificates & secrets** in the left menu | ||
| 2. Click **New client secret** | ||
| 3. Add a description: `qtodo secret` | ||
| 4. Choose expiration: 6 months, 12 months, 24 months, or custom | ||
| 5. Click **Add** | ||
| 6. **IMPORTANT**: Copy the **Value** immediately - it will not be shown again | ||
|
|
||
| **Save this value securely** - We will need to add this secret to the Hashicorp Vault in the OpenShift cluster. | ||
|
|
||
| #### ZTVP setup | ||
|
|
||
| In the `values-secret.yaml` file, we add a new entry with the secret we generated in the Azure portal. For example: | ||
|
|
||
| ```yaml | ||
| - name: qtodo-oidc-entraid | ||
| vaultPrefixes: | ||
| - apps/qtodo | ||
| fields: | ||
| - name: client-secret | ||
| path: ~/.azure/ztvp-qtodo-entraid-secret | ||
| ``` | ||
|
|
||
| In the `values-hub.yaml file`, we add the following configuration for the qtodo application: | ||
|
|
||
| ```yaml | ||
| qtodo: | ||
| overrides: | ||
| - name: app.oidc.authServerUrl | ||
| value: https://login.microsoftonline.com/<YOUR_TENANT_ID>/v2.0 | ||
| - name: app.oidc.clientId | ||
| value: <YOUR_CLIENT_ID> | ||
| - name: app.oidc.clientSecret.enabled | ||
| value: true | ||
| - name: app.oidc.clientSecret.vaultPath | ||
| value: secret/data/apps/qtodo/qtodo-oidc-entraid | ||
| ``` | ||
|
|
||
| ### RHTAS | ||
|
|
||
| ### RHTPA | ||
|
|
||
| #### API | ||
|
|
||
| #### UI |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.