-
Notifications
You must be signed in to change notification settings - Fork 575
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
KeycloakResourceBuilderExtensions.WithRealmImport is unnecessarily constraining the bind to a directory #5086
Comments
@julioct @DamianEdwards - any thoughts on this? |
The user might want to bind a single file at a time or the whole directory. |
Seems fine at first glance. I admit I've only used this pattern in containers by binding whole directories so far (it's a similar pattern to how many of the DB container support init SQL files). What happens if a user calls it with a directory first, and then with a file? Does the right thing just happen? |
Not any different than what happened with a container resource bind. I have an Aspire host where I, by host configuration, use local or remote identity providers. To avoid load unused realms, I conditionally load realms by conditionally binding to the realm configuration files. |
So this ends up being a tweak to the existing API and shouldn't be a compatibility issue AFAICT. @paulomorgado feel free to send a PR for this change and we can review there. |
@DamianEdwards, PR #7121 created! |
Background and Motivation
KeycloakResourceBuilderExtensions.WithRealmImport
is unnecessarily constraining the bind to a single directory, constraining the user choices.Proposed API
Consider something like this, instead:
Do not test if the source file or directory exists, because the user might create them later.
Usage Examples
The text was updated successfully, but these errors were encountered: