Comments (5)
I have found the bug. We accidentally removed all X-Amz-*
headers when using anonymous. The dev branch should fix this.
remotes::install_github("dyfanjones/paws/paws.common", ref = "anonymous_cred")
library(paws)
svc <- cognitoidentityprovider(config(credentials(anonymous = T), region = "us-east-1"))
resp <- svc$initiate_auth(
ClientId = "YOUR CLIENT ID",
AuthFlow = "USER_PASSWORD_AUTH",
AuthParameters = list(
USERNAME = "YOUR USER NAME",
PASSWORD = "YOUR PASSWORD"
)
)
For extra context:
There is a slightly difference in how paws
works compared to boto3
when getting credentials. Boto3
doesn't check if it has credentials where paws
does (hence: Error: No compatible credentials provided.
). I don't think we will remove this check as it is fairly useful and other aws sdk's do something similar.
Let me know if this fix works for you.
from paws.
Have you tried with anonymous credentials?
from paws.
Hi @DyfanJones, thanks for the reply!
I attempted to initialize the client with anonymous credentials according to documentation which suggests a logical value:
library(paws)
svc <- cognitoidentityprovider(
credentials = list(anonymous=TRUE),
region = "us-west-2"
)
svc$initiate_auth(
ClientId = "<auth_client_id>",
AuthFlow = "USER_PASSWORD_AUTH",
AuthParameters = list(
USERNAME = "<username>",
PASSWORD = "<password>"
)
)
This results in a "400 Bad Request" error, with the Amazon error type "Unknown Operation Exception".
INFO [2024-08-01 13:45:12.433]: <- HTTP/1.1 400 Bad Request
INFO [2024-08-01 13:45:12.433]: <- Date: Thu, 01 Aug 2024 20:45:12 GMT
INFO [2024-08-01 13:45:12.433]: <- Content-Type: application/x-amz-json-1.1
INFO [2024-08-01 13:45:12.433]: <- Content-Length: 38
INFO [2024-08-01 13:45:12.433]: <- Connection: keep-alive
INFO [2024-08-01 13:45:12.433]: <- x-amzn-RequestId: c8e39069-ad79-4755-920e-5f1e8f3afd0c
INFO [2024-08-01 13:45:12.433]: <- x-amzn-ErrorType: UnknownOperationException:
INFO [2024-08-01 13:45:12.433]: <-
Error: UnknownOperationException (HTTP 400).
from paws.
Sorry about that, not sure what is going on. I will have to set up cognito to understand what is causing the issue.
from paws.
Yes, this does the trick! Thank you for the solution and the clarification. Really appreciate your time.
from paws.
Related Issues (20)
- AWS config file doesn't support `endpoint_url` HOT 8
- Can't update lambda function with Ephemeral Stroage HOT 5
- Documentation page taking a long time to load HOT 11
- paws.common 0.7.2 cran release
- paws 0.6.0 cran release
- Update `paws_check_rhub` for rhubv2 HOT 1
- Fix paws.security.identity documentation
- s3$list_object_versions stopped working HOT 31
- Support EKS service accounts. HOT 2
- Potential issue with AWS default S3 region of us-east-1 HOT 11
- credential expiration comes back as numeric Inf (unclassed) HOT 5
- Getting 403 error when trying to access public S3 bucket HOT 3
- is it possible to list delete markers with s3$list_object_versions? HOT 17
- Refresh cached credentials
- paws.common release
- omics service error: could not resolve host HOT 22
- Invalid presigned S3 URL HOT 4
- A few issues with sts_assume_role_with_web_identity HOT 2
- Encode CopySource in operation CopyObject HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from paws.