Setting up AWS IAM Identity Center as an identity provider for Confluence
Tags: aws, iamidentitycenter, saml, confluence
Published: 2024-07-01 05:05:41

[AWS IAM Identity Center](https://aws.amazon.com/iam/identity-center/) is a great tool for managing access to multiple AWS accounts in one centralized location. Users can assume roles in the AWS accounts they have access to and work in the AWS console or CLI. 

It also supports single sign-on (SSO) capabilities to log in to some AWS services or third-party applications. One example of these applications is Confluence, which is widely used in enterprises. This blog post shows how to set up SSO in Confluence using AWS IAM Identity Center.

In what situations would you find this blog post useful?
1. You want to use Identity Center's SSO capabilities in Confluence.
2. You want to configure a source application for Amazon Q to test Q's security features (Q only uses information when a specific user has access to it)
3. You want to learn more about SSO and SAML.

In my case, I want to set up the Confluence integration to get familiar with Amazon Q. I chose the Confluence data sources because Confluence supports page-specific permissions, which should also be handled in Q. I'm using the trial version of Confluence for my tests and this blog post.

## Getting started: AWS IAM Identity Center

I assume that AWS IAM Identity Center is already configured. To integrate Confluence as an application, open AWS IAM Identity Center in the AWS console and select "Applications" in the navigation. Then, add a new application.

![AWS IAM Identity Center: Add a new application](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/mptvcmwmxb78krq7er78.png)

AWS offers a catalog of out-of-the-box integrations for more than 300 applications. Confluence is one of them, so choose it.
![Select application from the catalog](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/i36uinec9r817tofetf3.png)

Search for Confluence and select the result:
![Search for Confluence](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/clzrnba3mr4rg0j6m7y1.png)

The next page provides a button to open step-by-step instructions for additional configuration assistance. Select this button to view these instructions. There are also options to change the name or description used in Identity Center.
![Configure a new application in AWS IAM Identity Center](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/6wpdac9hkyhwt1agwjt3.png)

In the step-by-step instructions, you will find application-specific instructions to configure the integration. For example it shows which values have to be configured in Confluence and in Identity Center. Download the certificate and copy the URL (both URLs are the same). You will need this information later again when setting up the identity provider in Confluence.
![Step-by-step instructions](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/88cy6z3783ta7f3svfi5.png)

Now proceed with the necessary steps in Confluence. Later, we will need to perform some additional configurations in AWS IAM Identity Center.

## Confluence: Adding a domain
Open the Atlassian Admin by navigating to the URL https://admin.atlassian.com/. In Atlassian Admin, you can manage the settings required for Identity Center integration.

First, add the domain used by your users. Accounts in your domain can become managed accounts, which means you can use the SSO capabilities of Identity Center.

![Confluence: Verify your company domain](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/4c3op468o4ja8i5s0dxt.png)

Enter the domain name.
![Enter the domain name](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/qkx35irekecmer1sd3gh.png)

Before the domain can be associated, the ownership must be verified. I used DNS verification - feel free to use any of the other methods.  For DNS validation, create the TXT record in the DNS management for your domain.
![Domain DNS verification](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/73ut8uuop1116fgpyr5f.png)

Ensure that the status is set to verified. If it is not verified, check the domain verification again. Next, select "Claim accounts" to automatically claim new accounts under this domain.
![Domains: Overview](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/031nre67rg8snvgs7jfj.png)

Use the recommended "Automatically claim" option to claim new accounts from your domain.
![Claim settings](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/qwpv2cisb47f88do6r6n.png)

Now "claim setting" is set to "Automatically".
![Domain: claim setting automatically](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/qldsgdiita0912l1q6lk.png)

## Confluence: Create a identity provider
In the next step, we will create a identity provider and link it to AWS IAM Identity Center. In the security settings, select "Identity providers" and use "Other provider" as there is no specific integration for Identity Center.
![Create identity provider type other identity provider](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/w13i2mrg3lh3wd8hxtd6.png)

Confirm to start the free trial for Atlassian Guard to enable enterprise grade features.
![Subscribe to Atlassian Guard](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/5hs9r37c5pokfyc3niv0.png)

Enter a name for the identity provider, e.g. "AWS IAM Identity Center".
![Identity provider name](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/st59p1hhq6l17fjd9mj2.png)

Proceed with the SAML single sign-on integration.
![SAML single sign-on integration](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/zoaf6tvf8nlpgzje5yxl.png)

Read the notes, then continue to the next step.
![Notes](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/1kwnij5djyrmtzfez431.png)

Now paste the certificate and URL you copied during the application configuration in AWS IAM Identity Center.
![Identity provider settings](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/j6ayqrvsf4dmwhsw90b9.png)

In case you didn't copy the values, you can display them again.
![AWS IAM Identity Center values](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/5mpai29wsh0gnzom9yem.png)

After you have configured the values in Confluence, the Confluence wizard will display two URLs that need to be copied to AWS IAM Identity Center.
![Confluence identity provider URLS](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/8i2wua29hu52l4ldxtns.png)

In the Identity Center configuration, enter the URL of your Confluence instance and paste the two URLs you copied earlier.
![Maintain configuration in AWS IAM Identity Center](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/t4p7e1qhojkq9ps6ea19.png)

Now continue in Confluence again. Select the previously created domain.
![Select the domain created before](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/qs7d1mlv5tdtohymra3f.png)

Stop the configuration wizard and save the SAML settings.
![Save SAML settings](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/qbxr59yixqfdtqz73r8v.png)

## Confluence: Update authentication policy

As the final configuration step in Confluence, open the authentication policies and edit the newly created configuration (in my case, it is named "AWS IAM Identity Center").
![Update authentication policy](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/bl8vfvdhob570xmgc3kj.png)

Select the option "Enforce single sign-on".
![Enforce single sign-on](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/f68ism0o27xfg3usuar6.png)


## AWS Identity Center: Assign users or groups

In Identity Center, add the users or groups that will be allowed to use the new application. I created a group and assigned all users to it.![Identity Center: Users and groups](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/m9v99mvm362o6g7raqiq.png)

## Testing the integration

Log in to the AWS IAM Identity Center with one of the users. You should see the newly created Confluence application. Open the application.

![Identity Center: Confluence application](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/hxcvgh8tvkr6y4501pck.png)

Your browser will open a new window and you will be automatically signed in to Confluence.
![Confuence: Welcome](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/vmvkmzhijey9piiibmkw.png)

## Summary
If everything is set up correctly, the Confluence integration with AWS IAM Identity Center works well. The step-by-step instructions are useful, but read the documentation provided by Atlassian if you encounter any issues. Be careful when copying configuration values/URLs. Don't mix up the different URLs - this can cause errors and SSO won't work.

The integration of Confluence with AWS IAM Identity Center is just one example - many other applications can be integrated as well. AWS IAM Identity Center can also be used if you need a free SAML or OAuth 2.0 identity provider for software development or any other use case.