Problems restricting Personal AWS Login to app.kiro.dev while allowing Corporate access
search cancel

Problems restricting Personal AWS Login to app.kiro.dev while allowing Corporate access

book

Article ID: 439861

calendar_today

Updated On:

Products

ProxySG Software - SGOS

Issue/Introduction

Users accessing internet services via Cloud SWG using Proxy Fowarding access method.

One corporate requires access to https://app.kiro.dev/   (Kiro is an AI IDE used by certain groups of users within the organisation).

When access this service, multiple logging methods are available but the Cloud SWG admin only wants users to be able to use the organisational account and not personal options e.g. via AWS builder ID.

To restrict personal login access to https://app.kiro.dev/, the admin added the URL's below to the block list (these public domains were obtained from HAR files when accessing authenticating with the various options) without success.

https://d-9067642ac7.awsapps.com/start
https://prod.us-east-1.auth.kiro.aws.dev
https://prod.us-east-1.auth.desktop.kiro.dev
https://kiro-prod-us-east1.auth.us-east-1.amazoncognito.com

The Cloud SWG Admin did add https://us-east-1.signin.aws/platform/#### to a block list which did fix the issue but impacted other AWS URL's, and could therefor not use this option as the organization requires this URL for other AWS related services such as Quick or QuickSight.

How can one block access via AWS builder ID?

Environment

Kiro application.

UPE based policy.

Cloud SWG.

Edge SWG.

Cause

Need to filter based on the client_id parameter, which is the unique application identifier on the various platforms.

Resolution

Important: Replace the placeholders <YOUR_AWS_ACCOUNT_ID>, <YOUR_SSO_INSTANCE_ID>, and <YOUR_APP_ID> with the actual production values captured from your corporate AWS console or a corporate login HAR file to ensure you are only allowing your own tenant. Modify:

<proxy>
url.domain=amazonaws.com url.path.substring=/authorize request.header.Referer=https://app.kiro.dev/ url.query.substring="client_id=arn:aws:sso::<YOUR_AWS_ACCOUNT_ID>:application/<YOUR_SSO_INSTANCE_ID>/<YOUR_APP_ID>" deny

<proxy>
url.domain=signin.aws url.path.substring="/platform/authorize" request.header.Referer=https://app.kiro.dev/ url.query.substring="client_id=arn:aws:sso::<YOUR_AWS_ACCOUNT_ID>:application/<YOUR_SSO_INSTANCE_ID>/<YOUR_APP_ID>" deny

Note: the second rule was added as the amazonaws.com URL changed to signin.aws.

Additional Information

Looking at the HAR file produced by accessing the AWS builder ID login URL, the user is always redirected to an OAuth authorization endpoint on us-east-1.signin.aws where a number of parameters were passed in.

https://us-east-1.signin.aws/platform/authorize?callback_url=###&request_uri=####&identitystore_id=####&state=####&response_type=code&redirect_uri=https%3A%2F%2Fapp.kiro.dev%2Fsignin%2Foauth&client_id=arn%3Aaws%3Asso%3A%3A432677196278%3Aapplication%2Fssoins-<YOUR_AWS_ACCOUNT_ID>%2Fapl-e595db3280d78b63

The client_id parameter uniquely identifies the application on the AWS environment, so searching through the request for that identifier and blocking it means that only that application will be blocked.

Keeping it to signin.aws or amazonaws.com means that the rule will be triggered for any AWS location, whether in North America, EMEA or APAC.