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

Fix missing vault sso values #2992

Merged
merged 2 commits into from
Feb 25, 2025
Merged

Fix missing vault sso values #2992

merged 2 commits into from
Feb 25, 2025

Conversation

shaidar
Copy link
Contributor

@shaidar shaidar commented Feb 25, 2025

What are the relevant tickets?

#2989

Description (What does it do?)

I missed that part of writing some of the values to vault when I refactored the code yesterday. This should address what I missed.

Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hello @shaidar, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

Summary of Changes

I am currently reviewing this pull request. The purpose of this PR is to address an issue where some values were not being written to Vault during a recent refactor. This PR adds the missing Vault secret creation for several Keycloak clients, ensuring that all necessary SSO values are stored in Vault.

Highlights

  • Vault Secret Creation: This PR adds Vault secrets for the following Keycloak clients: olapps-unified-ecommerce-client, olapps-learn-ai-client, olapps-mitlearn-client, olapps-open-discussions-client, ol-platform-engineering-airbyte-client, ol-platform-engineering-dagster-client, ol-platform-engineering-leek-client, ol-platform-engineering-vault-client, ol-data-platform-superset-client, and ol-data-platform-openmetadata-client.
  • Dependency Injection: The PR imports secrets and pulumi_vault and calls setup_vault_provider() to properly configure the Vault provider.
  • Secret Data: Each Vault secret includes the Keycloak client's URL, client ID, client secret, a random secret for traefik-forward-auth, realm ID, realm name, and the realm's public key.

Changelog

Click here to see the changelog
  • src/ol_infrastructure/substructure/keycloak/main.py
    • Imported the secrets module to generate random secrets.
    • Imported the pulumi_vault module to interact with Vault.
    • Added setup_vault_provider() to configure the Vault provider.
    • Created Vault secrets for olapps-unified-ecommerce-client, storing OIDC credentials.
    • Created Vault secrets for olapps-learn-ai-client, storing OIDC credentials.
    • Created Vault secrets for olapps-mitlearn-client, storing OIDC credentials.
    • Created Vault secrets for olapps-open-discussions-client, storing OIDC credentials.
    • Created Vault secrets for ol-platform-engineering-airbyte-client, storing OIDC credentials.
    • Created Vault secrets for ol-platform-engineering-dagster-client, storing OIDC credentials.
    • Created Vault secrets for ol-platform-engineering-leek-client, storing OIDC credentials.
    • Created Vault secrets for ol-platform-engineering-vault-client, storing OIDC credentials.
    • Created Vault secrets for ol-data-platform-superset-client, storing OIDC credentials.
    • Created Vault secrets for ol-data-platform-openmetadata-client, storing OIDC credentials.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point in your pull request via creating an issue comment (i.e. comment on the pull request page) using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in issue comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist is currently in preview and may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments to provide feedback.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.


A secret's worth,
Is more than dirt,
In Vault it lies,
Safe from prying eyes.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

The pull request fixes the missing Vault SSO values. The changes look good overall, but I have a suggestion regarding a typo in the vault path for the open discussions client.

Summary of Findings

  • Vault path naming: The vault path for the open discussions client has a typo. It should be corrected to ensure consistency and prevent potential issues.

Assessment

The pull request addresses the issue of missing Vault SSO values by adding the necessary code to write the values to Vault. The changes seem correct and address the reported issue. I recommend having another reviewer look at the changes before merging, but feel free to request another review from Gemini via /gemini review when you have addressed these comments and I'll take another look!

@shaidar
Copy link
Contributor Author

shaidar commented Feb 25, 2025

/gemini review

Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request addresses the issue of missing Vault SSO values by adding the necessary code to write the values to Vault. The changes look good and seem to address the issue described in the pull request description.

Summary of Findings

Assessment

The code changes appear to correctly address the missing Vault SSO values. The added code includes the necessary logic to write the required values to Vault. I recommend having another reviewer look at this code before merging, but feel free to request another review from Gemini via /gemini review when you have addressed these comments and I'll take another look!

@shaidar shaidar merged commit be34489 into main Feb 25, 2025
5 checks passed
@shaidar shaidar deleted the sar/sso_secrets_fix branch February 25, 2025 17:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants