AWS ParallelCluster API is a serverless application with JavaScript client-side
- Dominant language
- Python
- Stars
- 888
- Forks
- 314
- Avg merge
- 1d 10h
- Merged PRs (30d)
- 43
Description
Failed to use the deployed API in my JavaScript applciation.
Here is the full information about a test I did on AWS Cloudshell using javascript and python examples, both using the instruction from:
https://docs.aws.amazon.com/parallelcluster/latest/ug/api-reference-v3.html
## The issue:
In JavaScript, when I use the API_KEY, i got an error in the response about missing authentication header.
In Python, I have the same issue.
In JavaScript, when I use aws sts assume-role to switch the role, and don't provide API_KEY, i have different authentication error.
In Python, when I do the same, the script works and gives the expected output
### JavaScript error (With API_KEY)
Error: Forbidden
status: 403,
response: ...
text: `{"message":"Authorization header requires 'Credential' parameter. Authorization header requires 'Signature'
parameter. Authorization header requires 'SignedHeaders' parameter. Authorization header requires existence
of either a 'X-Amz-Date' or a 'Date' header.
Authorization=NCyogaUawu8xMhSZK9wS055KIUz1BgMJ9EuhEpf0"}\n`,
### JavaScript error (With Role)
...
text: '{"message":"Missing Authentication Token"}\n',
## Test Requirement
For the test you need a key-pair and npm account (or you can use the one i created and still available)
## Test files
The following files include the detailed instructions to repeat the tests and the output files from all commands (where relevant).
[parallelClusterTest.txt](https://github.com/aws/aws-parallelcluster/files/9939482/parallelClusterTest.txt)
[jsOutput_with_role.txt](https://github.com/aws/aws-parallelcluster/files/9939491/jsOutput_with_role.txt)
[pyOutput.txt](https://github.com/aws/aws-parallelcluster/files/9939492/pyOutput.txt)
[pyOutput_with_key.txt](https://github.com/aws/aws-parallelcluster/files/9939493/pyOutput_with_key.txt)
[pyOutput_with_key_and_role.txt](https://github.com/aws/aws-parallelcluster/files/9939494/pyOutput_with_key_and_role.txt)
[jsOutput_with_key.txt](https://github.com/aws/aws-parallelcluster/files/9939495/jsOutput_with_key.txt)
[jsOutput_with_key_and_role.txt](https://github.com/aws/aws-parallelcluster/files/9939496/jsOutput_with_key_and_role.txt)
Therse are the python and js files:
[describe_pcluster_client_with_key_js.txt](https://github.com/aws/aws-parallelcluster/files/9939559/describe_pcluster_client_with_key_js.txt)
[describe_pcluster_client_with_key_py.txt](https://github.com/aws/aws-parallelcluster/files/9939560/describe_pcluster_client_with_key_py.txt)
[test_pcluster_client_py.txt](https://github.com/aws/aws-parallelcluster/files/9939561/test_pcluster_client_py.txt)
[describe_pcluster_client_js.txt](https://github.com/aws/aws-parallelcluster/files/9939562/describe_pcluster_client_js.txt)
[describe_pcluster_client_py.txt](https://github.com/aws/aws-parallelcluster/files/9939563/describe_pcluster_client_py.txt)
Contributor guide
Research direction
Start by reviewing the AWS ParallelCluster API reference and the attached JavaScript and Python test files, especially the key and role variants. Reproduce the requests in AWS CloudShell and compare their authentication behavior and outputs. Done means the JavaScript client can use the documented authentication methods successfully, with updated verification against the supplied output files.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- aws, javascript, python
- Domain
- api, authentication, cloud
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100