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

Keycloak Breeze integration #43240

Merged
merged 5 commits into from
Oct 30, 2024

Conversation

o-nikolas
Copy link
Contributor

Work is starting on multi-team Airflow, and this project has many dependencies on a auth manager that can support authn and authz and also support the changes to the auth manager api (upcoming). An option for this is Keycloak.

This PR adds a Breeze integartion for Keycloak which creates a container running keycloak, which uses the existing Postgres container as the DB and disables the requirements for ssl/https/certificates to use the Keycloak admin console (since this is only for development purposes not production).


^ Add meaningful description above
Read the Pull Request Guidelines for more information.
In case of fundamental code changes, an Airflow Improvement Proposal (AIP) is needed.
In case of a new dependency, check compliance with the ASF 3rd Party License Policy.
In case of backwards incompatible changes please leave a note in a newsfragment file, named {pr_number}.significant.rst or {issue_number}.significant.rst, in newsfragments.

@o-nikolas
Copy link
Contributor Author

@potiuk Let me know what you think of this, before I take it out of Draft.

@potiuk
Copy link
Member

potiuk commented Oct 24, 2024

This looks great. I only have one comment about using same "postgres" service for keycloack and metadata-db. Those two should be separate postgres instances IMHO.

@potiuk
Copy link
Member

potiuk commented Oct 24, 2024

Also it does not yet work when I try to run it due to "keyclok" typo in constants :)

@o-nikolas
Copy link
Contributor Author

Also it does not yet work when I try to run it due to "keyclok" typo in constants :)

Ugh, let me fix 😅

@o-nikolas o-nikolas force-pushed the onikolas/keycloak_integration branch from c6bd1fe to b84f881 Compare October 28, 2024 17:06
Work is starting on multi-team Airflow, and this project has many
dependencies on a auth manager that can support authn and authz and also
support the changes to the auth manager api (upcoming). An option for
this is Keycloak.

This PR adds a Breeze integartion for Keycloak which creates a container
running keycloak, which uses the existing Postgres container as the DB
and disables the requirements for ssl/https/certificates to use the
Keycloak admin console (since this is only for development purposes not
production).
@o-nikolas o-nikolas force-pushed the onikolas/keycloak_integration branch from 4256cdb to fa8fbc8 Compare October 29, 2024 15:11
@o-nikolas o-nikolas marked this pull request as ready for review October 29, 2024 20:55
@o-nikolas
Copy link
Contributor Author

@potiuk

This one is ready for review as well. Fixed the typo and added a check to ensure the keycloak integration is used in conjunction with the postgres backend.

Copy link
Member

@potiuk potiuk left a comment

Choose a reason for hiding this comment

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

LGTM. Small NIT with suggestion.

@potiuk
Copy link
Member

potiuk commented Oct 29, 2024

Maybe also we should extract all other backend constants for consistency @o-nikolas ? It looks weird when only one POSTGRES is constant.

@o-nikolas
Copy link
Contributor Author

Maybe also we should extract all other backend constants for consistency @o-nikolas ? It looks weird when only one POSTGRES is constant.

Fair enough, I didn't extract them because they'd only be used in place there, not imported elsewhere which also feel strange. But I don't feel strongly about one approach more than the other, so I can make the change to extract constants for all 👍

Copy link
Contributor

@ferruzzi ferruzzi left a comment

Choose a reason for hiding this comment

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

LGTM

@o-nikolas o-nikolas merged commit a2cbaec into apache:main Oct 30, 2024
82 checks passed
@o-nikolas o-nikolas deleted the onikolas/keycloak_integration branch October 30, 2024 22:00
ellisms pushed a commit to ellisms/airflow that referenced this pull request Nov 13, 2024
* Keycloak Breeze integration

Work is starting on multi-team Airflow, and this project has many
dependencies on a auth manager that can support authn and authz and also
support the changes to the auth manager api (upcoming). An option for
this is Keycloak.

This PR adds a Breeze integartion for Keycloak which creates a container
running keycloak, which uses the existing Postgres container as the DB
and disables the requirements for ssl/https/certificates to use the
Keycloak admin console (since this is only for development purposes not
production).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants