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

Setup role based authentication and authorization for Airflow UI with Cognito #102

Closed
ramesh-maddegoda opened this issue Jun 6, 2024 · 14 comments

Comments

@ramesh-maddegoda
Copy link
Contributor

💡 Description

At the moment, those who have access to the MCP AWS account can use many functionalities of MWAA. It is required restrict the features based on roles of users.

⚔️ Parent Epic / Related Tickets

No response

@jordanpadams
Copy link
Member

jordanpadams commented Jun 13, 2024

Status: Tested with 2 different roles but issues with MCP roles. To follow with MCP regarding adding/remove Admin.

  • Document how to set this up.

@nutjob4life
Copy link
Member

nutjob4life commented Jun 25, 2024

Had a chat with Gabe from MCP, considering temporary users to test with various roles (because we always have the admin role). Need the extra roles to test each situation. Some data persistence issue currently being troubleshooted.

@tloubrieu-jpl
Copy link
Member

To be discussed with Gabe when Ramesh is back.

@tloubrieu-jpl
Copy link
Member

Ramesh looks at Cognito authentication as an alternative to solve the issue. That allows to attach specific IAM policies to users which match with their actual authorization.

@ramesh-maddegoda
Copy link
Contributor Author

Tested COgnito integration with the approach proposed with the following Amazon articles.

Accessing a private Amazon MWAA environment using federated identities
https://d1.awsstatic.com/whitepapers/accessing-a-private-amazon-mwaa-environment-using-federated-identities.pdf

Application load balancer single-sign-on for Amazon MWAA
https://github.com/aws-samples/alb-sso-mwaa

There was a problem related with validating the digital signature of the access token. The documentation says, that issue will not be there, when the lambda zip file is built on a linux system with required cryptography libraries.

Regardless of that, it was possible to test the MWAA Role-based access with Cognito users.

@ramesh-maddegoda
Copy link
Contributor Author

If we do not want to use Cognito for Nucleus users, another option available creating AWS accounts for user, create MWAA IAM for those users such as View, Ops, Admin etc. This option is much easier to implement technically, compared to the Cognito option.

@tloubrieu-jpl
Copy link
Member

@ramesh-maddegoda need to present the architecture to the JPL SA's to validate it for production.

@tloubrieu-jpl
Copy link
Member

@ramesh-maddegoda provided the architecture proposed to the SAs.

@tloubrieu-jpl
Copy link
Member

We decided to move forward with the Cognito based authentication.

@tloubrieu-jpl
Copy link
Member

tloubrieu-jpl commented Sep 24, 2024

The SSO works but not the redirection between nucleus and cognito.

@tloubrieu-jpl
Copy link
Member

@ramesh-maddegoda is still investigating the redirection issue.

@jordanpadams jordanpadams added B15.1 and removed B15.0 labels Sep 30, 2024
@jordanpadams jordanpadams changed the title Setup role based authentication and authorization for Airflow UI Setup role based authentication and authorization for Airflow UI with Cognito Oct 1, 2024
@jordanpadams
Copy link
Member

Standup status: blocked by intermittent issues with Cognito / Lambda solution for authentication.

@ramesh-maddegoda
Copy link
Contributor Author

Created pull request #122

@ramesh-maddegoda
Copy link
Contributor Author

The pull request #122 was merged.

As a part of this ticket, an ALB based approach to enable Cognito authentication for Nucleus Airflow UI was implemented. However, the ALB based approach only worked sometimes and currently there is an Amazon support ticket Case 172781777100323) to troubleshoot it. At the moment, a python script is used to get a web token URL to access Airflow UI.

A new ticket Web based Cognito authentication for Nucleus Airflow UI was created to focus on resolving this ALB related problem and eventually implement web based Cognito authentication for Nucleus Airflow UI.

@github-project-automation github-project-automation bot moved this from Release Backlog to 🏁 Done in B15.0 Oct 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
No open projects
Status: 🏁 Done
Development

No branches or pull requests

4 participants