providers/amazon/docs/auth-manager/setup/identity-center.rst
.. Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
.. http://www.apache.org/licenses/LICENSE-2.0
.. Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
.. warning:: The AWS auth manager is alpha/experimental at the moment and may be subject to change without warning.
In order to use the AWS auth manager, you first need to configure AWS IAM Identity Center <https://aws.amazon.com/iam/identity-center/>_.
AWS IAM Identity Center is used by the AWS auth manager for authentication purposes (login and logout).
Following configuration, the Airflow environment administrator can manage users and groups with Identity Center service.
The AWS auth manager needs two resources in AWS IAM Identity Center: an instance and an application. You can must create them manually.
The AWS auth manager leverages SAML 2.0 as the underlying technology powering authentication against AWS Identity Center.
There are several instance types, but only Organization level instances can use SAML 2.0 applications. See more details
about instances types here <https://docs.aws.amazon.com/singlesignon/latest/userguide/identity-center-instances.html>_.
Please follow AWS documentation <https://docs.aws.amazon.com/singlesignon/latest/userguide/get-set-up-for-idc.html>_
to create the AWS IAM Identity Center instance at the organization level.
.. _identity_center_manual_configuration_application:
Please follow the instructions below to create the AWS IAM Identity Center application.
IAM Identity Center console <https://console.aws.amazon.com/singlesignon>_.Airflow. Then, enter a Description... note:: You will need to set this address in Airflow configuration later.
Under Application metadata, choose Manually type your metadata values. Then, provide the Application ACS URL and Application SAML audience as follows.
.. important::
Replace <base_url> by the base URL of your Airflow UI. It should be defined in AIRFLOW__API__BASE_URL
(e.g. localhost:8080 if Airflow is running locally).
<base_url>/auth/login_callbackaws-auth-manager-saml-clientOnce the application is created, you need to configure the attribute mappings.
Go to the details page of the application that you just created.
Choose Actions.
Under Actions, choose Edit attribute mappings.
On the Attribute mappings page, you need to configure the different attribute mappings between your identity
source and AWS IAM Identity Center. For more information on attribute mappings, see the
IAM Identity Center documentation <https://docs.aws.amazon.com/singlesignon/latest/userguide/attributemappingsconcept.html>_.
The AWS auth manager needs two attributes: id and groups.
If you use the default Identity Center directory as identity source, you can use the configuration below:
id
id${user:AD_GUID}basicgroups
groups${user:groups}basicOnce both attributes id and groups are defined, choose Save changes.
You need to set in Airflow configuration:
<base_url> specified in AWS IAM Identity Center configuration previously.. code-block:: ini
[api]
base_url = <base_url>
[aws_auth_manager]
saml_metadata_url = <saml_metadata_file_url>
or
.. code-block:: bash
export AIRFLOW__API__BASE_URL='<base_url>'
export AIRFLOW__AWS_AUTH_MANAGER__SAML_METADATA_URL='<saml_metadata_file_url>'