Skip to content
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

Verified Permissions always return 400 incorrect #241

Open
theyardstudio opened this issue Jul 28, 2023 · 2 comments
Open

Verified Permissions always return 400 incorrect #241

theyardstudio opened this issue Jul 28, 2023 · 2 comments
Assignees
Labels
bug Something isn't working

Comments

@theyardstudio
Copy link

Dependencies

{:deps {com.cognitect.aws/api                 {:mvn/version "0.8.686"}
        com.cognitect.aws/endpoints           {:mvn/version "1.1.12.504"}
        com.cognitect.aws/verifiedpermissions {:mvn/version "848.2.1413.0"}}

Description with failing test case

Trying to invoke any Verified Permissions :op results in:

{:cognitect.aws.http/status 400,
 :cognitect.anomalies/category :cognitect.anomalies/incorrect}

All the operations work when running them via the AWS CLI or in a Lambda via the SDK - so the relevant accounts have all the required IAM permissions and are being passed all the necessary request parameters (at least as far as the CLI or SDK are concerned).

for example:

(-> (aws/client {:api :verifiedpermissions :region "us-east-1"})
      (aws/invoke {:op :ListPolicies
                   :request {:policyStoreId "xxxxxxxxxxxxxxxxxxxxxx"}}))

Stack traces

No further feedback is returned, just the anomaly.

@scottbale
Copy link
Collaborator

Thanks for the writeup. I am able to reproduce this problem.

The presence of the accept request header seems to be causing the problem in this case (source code). When I comment this line out I get a 200 response.

Unfortunately:

  • as you can see, there's a comment on that line of code to the effect that at least one service we know of (apigateway) requires that request header
  • I can't think of a way through aws-api public API to remove that header on a per-client basis.

We'll have to give this some thought...

@scottbale scottbale self-assigned this Aug 11, 2023
@scottbale scottbale added the bug Something isn't working label Aug 11, 2023
@scottbale
Copy link
Collaborator

Related to #206

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants