Skip to content

Update Keycloak admin variable names in extensions#7124

Merged
davidfowl merged 2 commits intomicrosoft:mainfrom
paulomorgado:Keycloak-Bootstrap-Admin
Jan 18, 2025
Merged

Update Keycloak admin variable names in extensions#7124
davidfowl merged 2 commits intomicrosoft:mainfrom
paulomorgado:Keycloak-Bootstrap-Admin

Conversation

@paulomorgado
Copy link
Copy Markdown
Contributor

Description

Renamed constants for Keycloak admin username and password in the KeycloakResourceBuilderExtensions class from KEYCLOAK_ADMIN and KEYCLOAK_ADMIN_PASSWORD to KC_BOOTSTRAP_ADMIN_USERNAME and KC_BOOTSTRAP_ADMIN_PASSWORD. This change aligns with https://www.keycloak.org/docs/26.0.0/upgrading/#admin-bootstrapping-and-recovery.

Checklist

  • Is this feature complete?
    • Yes. Ready to ship.
    • No. Follow-up changes expected.
  • Are you including unit tests for the changes and scenario tests if relevant?
    • Yes
    • No
  • Did you add public API?
    • Yes
      • If yes, did you have an API Review for it?
        • Yes
        • No
      • Did you add <remarks /> and <code /> elements on your triple slash comments?
        • Yes
        • No
    • No
  • Does the change make any security assumptions or guarantees?
    • Yes
      • If yes, have you done a threat model and had a security review?
        • Yes
        • No
    • No
  • Does the change require an update in our Aspire docs?

Renamed constants for Keycloak admin username and password in the `KeycloakResourceBuilderExtensions` class from `KEYCLOAK_ADMIN` and `KEYCLOAK_ADMIN_PASSWORD` to `KC_BOOTSTRAP_ADMIN_USERNAME` and `KC_BOOTSTRAP_ADMIN_PASSWORD`. This change aligns with https://www.keycloak.org/docs/26.0.0/upgrading/#admin-bootstrapping-and-recovery.
@dotnet-policy-service dotnet-policy-service Bot added the community-contribution Indicates that the PR has been added by a community member label Jan 15, 2025
@davidfowl
Copy link
Copy Markdown
Contributor

So keycloak is broken today?

@paulomorgado
Copy link
Copy Markdown
Contributor Author

So keycloak is broken today?

Not yet! But I don't know when it will be,

@davidfowl
Copy link
Copy Markdown
Contributor

I think you need to update some tests

Removed `KEYCLOAK_ADMIN` and `KEYCLOAK_ADMIN_PASSWORD`
and replaced them with `KC_BOOTSTRAP_ADMIN_USERNAME`
and `KC_BOOTSTRAP_ADMIN_PASSWORD` for improved naming
convention while maintaining functionality.
@paulomorgado
Copy link
Copy Markdown
Contributor Author

@davidfowl, fixed the tests, but I don't understand why it's failing for Linux.

@DamianEdwards
Copy link
Copy Markdown
Member

Change seems fine.

@DamianEdwards
Copy link
Copy Markdown
Member

/azp run

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 1 pipeline(s).

@davidfowl
Copy link
Copy Markdown
Contributor

/azp run

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 1 pipeline(s).

@DamianEdwards
Copy link
Copy Markdown
Member

/azp run

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 1 pipeline(s).

@davidfowl davidfowl enabled auto-merge (squash) January 18, 2025 21:24
@davidfowl
Copy link
Copy Markdown
Contributor

This change is good, the redis test is flaky (it shouldn't block this PR).

@davidfowl davidfowl merged commit 2ed8af8 into microsoft:main Jan 18, 2025
@paulomorgado paulomorgado deleted the Keycloak-Bootstrap-Admin branch January 20, 2025 08:47
@github-actions github-actions Bot locked and limited conversation to collaborators Feb 19, 2025
@github-actions github-actions Bot added the area-app-model Issues pertaining to the APIs in Aspire.Hosting, e.g. DistributedApplication label Mar 10, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

area-app-model Issues pertaining to the APIs in Aspire.Hosting, e.g. DistributedApplication community-contribution Indicates that the PR has been added by a community member

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants