In this guide, you'll complete the steps to enable and configure auth (both authentication and authorization) for Flyte using Okta both as IdP and external authorization server. Further explanations and instructions for other IdPs can be found in the Flyte documentation
A heaviliy summarized description of the auth implementation in Flyte and how it operates with an External Authorization Server is presented in the following diagram:
Before heading to the steps, below you'll find brief definitions for some terms we're going to use:
- Flow: the set of steps a component will follow to perform a task in a secure manner
- IdP (Identity Provider): a component external to Flyte that will provide user identity. Potentially, it will also be used by Flyte to redirect authorization requests
- Application: your Flyte deployment to be registered in one of the supported IdPs
Regardles of the IdP you choose, Flyte uses the OAuth 2.0 protocol to handle Authorization and OIDC for Identity Management. If you want to dive a little deeper, you can check Okta's Illustrated Guide to OAuth and OIDC.
In this section you'll create three app integrations, one for each component that is part of an authentication/authorization flow: flyteconsole
, flytectl
and flytepropeller
:
- Login to your Okta account (you can sign up for a new one)
- Create a new App integration
- Select
OIDC - OpenID Connect
- Select
Web Application
as the Application type - Use
flyteconsole
as the App integration name - Replace the default Sign-in redirect URIs with your Ingress DNS name adding
/callback
at the end.
Example:
https://flyte-the-hard-way.uniondemo.run/callback
- Use the same value as the Sign-out redirect URIs
- Select
Allow everyone in your organization to access
in the Controlled access section. You can adapt this setting to reflect your organization's security policies and groups assignments. - Click Save
- Take note of the
Client ID
andClient secret
- Create a new App integration
- Select
OIDC - OpenID Connect
- Select
Native Application
as the Application type - Use
flytectl
as the App integration name - Add
http://localhost:53593/callback
to the sign-in redirect URIs. The other options can remain as default. - Consult with your security team regarding the specific groups that should have access to Flyte's command line tools (like
flytectl
orpyflyte
) and configure the Assignments section accordingly - Click Save
- Take note of the
ClientID
. There will not be a client secret
- Create a new App integration
- Select
OIDC - OpenID Connect
- Select
Web Application
as the Application type - Check the
Client credentials
option in the Client acting on behalf of itself section - As this is not a user-facing app, it does not need a specific redirect URI nor it needs to be assigned to any user/group
- Click Save
- Take note of the
ClientID
andClientSecret
- From the Okta dashboard, go the Security option in the lefthand side menu
- Select API
- Click on Add Autorization Server
- Set a descriptive Name
- Set the Audience parameter to match exactly the domain name of your Ingress resource.
Example:
https://flyte-the-hard-way.uniondemo.run
(see Lab 9 for more details)
- Click Save
- Inside the Authorization Server config menu, go to Scopes
- Clikc Add Scope
- Set the name to
all
- Check the
Required
option in the User consent section - Uncheck the
Block services from requesting this scope
option. Otherwise it would block inter-service requests, necessary for both user and non-user facing Flyte components - Click Save
- Add another scope with the following parameters:
- Name:
offline
- User consent :
Required
- Uncheck
Block services from requesting this scope
- Metadata:
Include in public metadata
- Now go to the Access policies tab inside the authorization server configuration page
- Click Add Policy
- Set a name and leave the Assign to option by default
- Add an informative Description
- Click on Create Policy
- Click on Add Rule
- Set a Rule Name and leave all the other options by default unlesss otherwise indicated by your organization's security policies
- Click on Create Rule
- At the top of the page, click on Back to Authorization Servers
- Take note of the Issuer URI for your Authorization Server. It will be used as the
baseURL
parameter in the Helm chart.