aws-gate | Better AWS SSM Session manager CLI client | Identity Management library
kandi X-RAY | aws-gate Summary
kandi X-RAY | aws-gate Summary
Better AWS SSM Session manager CLI client
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
- SSH to an instance
- Query EC2 API
- Get instance details from configuration file
- Check if given ip is a valid ip address
- Load configuration from a list of configuration files
- Locate config files
- Merge two dictionaries
- Merge default values
- Bootstrap session - manager
- Extract session - level data
- Download the session - manager
- Install the SSM bundle
- List EC2 instances
- Serialize data into JSON format
- Show ssh configuration
- Create SSH proxy for an instance
- Create an SSMs session
- Execute a command via SSH
- Parse command line arguments
- Decorator to require a plugin
- Validate that AWS region is valid
- Validate that the AWS profile is valid
- Get install requirements
- Get profile from arguments
- Get region from args
- Return the default region name
aws-gate Key Features
aws-gate Examples and Code Snippets
Community Discussions
Trending Discussions on aws-gate
QUESTION
This is my first project on AWS and I would appreciate it if someone can assist me with the AWS Cognito and google authentication. I am trying to authenticate users using their google email. Once the user's login using a web browser I receive an access token appended to the redirect URI as shown below. I am planning on retrieving the access code and then requesting an access token from AWS Cognito via AWS Lambda to allow users to make various API calls in AWS-Gateway.
I am struggling to extract the access token from the URL.
Redirect URL: https://test.execute-api.us-east-2.amazonaws.com/dev/?mytoken=
The URL after the user authenticates via google: https://test.execute-api.us-east-2.amazonaws.com/dev/?mytoken=#id_token=xyzzzzzzzzzzexpires_in=3600&token_type=Bearer
Things I already tried:
- Try to access code from URL query parameter in AWS gateway but since the URL contain pound sign I am not able to parse or access it as a query parameter in AWS lambda.
- Try accessing header in lambda function but access code is not passed as a header, it only appends to the path URL
ANSWER
Answered 2020-Nov-11 at 22:56I was able to fix this problem by using the following steps. The underlying issue was the request-response type.
- Change the OAuth workflow to select 'Authorization code grant' under AWS Cognito > App Client Setting > Oauth 2.0
- AWS Gateway > Resources > Method Response > Add code 320 and 405
- Change redirect uri to: https://test.execute-api.us-east-2.amazonaws.com/dev/
- AWS Gateway > Resources > Method Request > Query String Parameter > Add 'code'
As I mentioned above the underlying issue was request-responce type. When we request google to response with request type we need to make sure we ask for authentication code and not for authentication token. Here is the google doc for reference: https://developers.google.com/identity/protocols/oauth2/openid-connect
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install aws-gate
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page