-
Notifications
You must be signed in to change notification settings - Fork 329
Add Guide to Secure AWS HTTP APIs Using Asgardeo #5253
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
base: master
Are you sure you want to change the base?
Conversation
@@ -0,0 +1,279 @@ | |||
--- | |||
template: templates/quick-start.html | |||
heading: Secure a Pharmacy User API with AWS API Gateway and Asgardeo |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shall we keep the heading generic?
heading: Secure a Pharmacy User API with AWS API Gateway and Asgardeo | |
heading: Securing APIs with AWS API Gateway and Asgardeo |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Addressed in e4fc8aa
--- | ||
template: templates/quick-start.html | ||
heading: Secure a Pharmacy User API with AWS API Gateway and Asgardeo | ||
description: This guide walks you through securing a Pharmacy User API using AWS API Gateway and WSO2 Asgardeo. You'll deploy a Lambda function, expose it via an HTTP API, and protect the endpoint using JWT validation powered by Asgardeo. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
description: This guide walks you through securing a Pharmacy User API using AWS API Gateway and WSO2 Asgardeo. You'll deploy a Lambda function, expose it via an HTTP API, and protect the endpoint using JWT validation powered by Asgardeo. | |
description: This guide walks you through securing a Pharmacy User API using AWS API Gateway and Asgardeo. You'll deploy a Lambda function, expose it via an HTTP API, and protect the endpoint using JWT validation powered by Asgardeo. |
JWT validation is independent of Asgardeo, isn't it? in that case, "JWT validation powered by Asgardeo." isn't accurate, IMO
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Addressed in e4fc8aa
what_you_will_learn: | ||
- Deploy a serverless AWS Lambda endpoint | ||
- Secure the API using AWS API Gateway's JWT authorizer | ||
- Configure OAuth2 application and API scopes in Asgardeo | ||
- Protect API access using JWTs and test secured endpoints |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what_you_will_learn: | |
- Deploy a serverless AWS Lambda endpoint | |
- Secure the API using AWS API Gateway's JWT authorizer | |
- Configure OAuth2 application and API scopes in Asgardeo | |
- Protect API access using JWTs and test secured endpoints | |
what_you_will_learn: | |
- Deploy a serverless endpoint using AWS Lambda | |
- Secure your API with AWS API Gateway’s JWT authorizer | |
- Configure an OAuth2 application and define API scopes in Asgardeo | |
- Protect and test your API using JWT-based access control |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Addressed in e4fc8aa
prerequisites: | ||
- About 20 minutes | ||
- AWS Account with CLI access | ||
- <a href="https://asgardeo.io" target="_blank" rel="noopener noreferrer">Asgardeo account</a> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- <a href="https://asgardeo.io" target="_blank" rel="noopener noreferrer">Asgardeo account</a> | |
- an <a href="https://asgardeo.io" target="_blank" rel="noopener noreferrer">Asgardeo account</a> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Addressed in e4fc8aa
## Step 1: Create and Deploy the Lambda Function | ||
|
||
### 1. Create IAM Role for Lambda Execution | ||
```bash |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shall we add a description?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Addressed in e4fc8aa
## Step 3: Obtain a Bearer Token for Asgardeo Manage App | ||
|
||
You will need a Client ID and Client Secret from an Asgardeo Manage application that can be used to call Asgardeo’s management APIs. You can use an existing application or create a new Manage application in the Asgardeo console with the Client Credentials grant enabled. Make sure the application has the scope internal_application_mgt_create (this scope is required to create a new application via the API). | ||
```bash |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
```bash | |
```bash |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Addressed in e4fc8aa
|
||
## Step 3: Obtain a Bearer Token for Asgardeo Manage App | ||
|
||
You will need a Client ID and Client Secret from an Asgardeo Manage application that can be used to call Asgardeo’s management APIs. You can use an existing application or create a new Manage application in the Asgardeo console with the Client Credentials grant enabled. Make sure the application has the scope internal_application_mgt_create (this scope is required to create a new application via the API). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You will need a Client ID and Client Secret from an Asgardeo Manage application that can be used to call Asgardeo’s management APIs. You can use an existing application or create a new Manage application in the Asgardeo console with the Client Credentials grant enabled. Make sure the application has the scope internal_application_mgt_create (this scope is required to create a new application via the API). | |
You will need a Client ID and Client Secret from an Asgardeo application that is authorized to invoke Asgardeo management APIs. You can use an existing application or create a new application in the Asgardeo console with the Client Credentials grant enabled. Make sure the application has the scope `internal_application_mgt_create` (this scope is required to create a new application via the API). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Addressed in e4fc8aa
-d "grant_type=client_credentials&scope=internal_application_mgt_create" 2>/dev/null | jq -r .access_token | ||
``` | ||
Use the obtained token in all subsequent Asgardeo API calls: | ||
```bash |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
```bash | |
```bash |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Addressed in e4fc8aa
Purpose
This PR introduces a step-by-step guide for securing AWS HTTP API Gateway endpoints using JWT authentication with WSO2 Asgardeo as the identity provider. It demonstrates a fully CLI-based approach suitable for developers building serverless applications that require secure access control.