Open fr4gment opened 6 months ago
Thanks for reaching out. I'm going to transfer this to our cross-SDK repository and reach out to the Identity Center team regarding this issue (ref: V1211727651), since they would need to provide support for the FIPS endpoint. I'll share any updates here in this issue.
hi @tim-finnigan , any update you are able to provide on this issue?
I confirmed that the SSO team has a backlog item to support the FIPS endpoint https://oidc-fips.us-gov-west-1.amazonaws.com/
. The CLI/SDKs rules are expecting the the endpoint to look like that, so the SSO team needs to support that URL. In the meantime have you tried manually specify the endpoint as https://oidc.us-gov-west-1.amazonaws.com/
?
for SSO, you specify a start-url
, which (if I understand it correctly) is the login portal/idp. There is no option to override the OIDC endpoint.
Describe the bug
The ultimate issue I'm raising is that I am unable to use FIPS endpoints for s3 while also utilizing sso as my authentication method.
Expected Behavior
I'd expect one of the methods that I tried to allow SSO authentication while seamlessly being able to utilize s3's FIPS endpoints.
Current Behavior
Setting the
AWS_USE_FIPS_ENDPOINT
env variable to true, causes authentication attempts to use an SSO URL that does not exist. Same thing occurs if you set theuse_fips_endpoint
option in the awsconfig
file.This happens because there is no FIPS endpoint for SSO (in fact, the sso FIPS endpoints for govcloud do not use any FIPS identifiers in their FQDNs), you're intended to use the non-FIPS endpoint for SSO and then utilize the FIPS endpoint for the specific service you are attempting to access. This previous statement would be fine if I was able to provide service specific settings for FIPS, but that also does not work. I.e. using this setting in the aws
config
file.This setting is completely ignored when using s3 from the cli.
Attempts to utilize the endpoint override option
--endpoint-url
is unsuccessful, because s3 FIPS endpoints require the Virtual Host-Style addressingThe s3 CLI expects a non-virtual host-style address in the
--endpoint-url
and is expecting the bucket name to be passed as a separate parameter:However, FIPS doesn't support
https://s3-fips.<region>.amazonaws.com
, which causes the above command to fail.Because FIPS requires Virtual Host-Style addressing, it would only support this type of command line:
Which does authenticate successfully, but the CLI program is expecting it to return a
Bucket
property (assuming because its expecting the--endpoint-url
parameter to point to a URL that would have provided a listing of buckets, but the only supported FIPS endpoint is the bucket specific address)With the
--debug
option on, you can see that the'Buckets'
string being returned is actually an error for the keyBuckets
.The final option is to manually set the FIPS settings
AWS_USE_FIPS_ENDPOINT
(remove the setting to SSO and then add the setting back when using s3 commands, however, during a substantially long file transfer, SSO token will need to be refreshed, and will attempt to utilize FIPS endpoint for the refresh and fails.Reproduction Steps
Failing SSO auth
config
file.Ignoring s3
use_fips_endpoint
optionconfig
file with the following settings.Specifying
--endpoint-url
parameterThis will fail because s3 fips only supports Virtual host-address in the URL.
Specifying the virtual host-name address (as required by FIPS) will fail with
Buckets
output. (utilize--debug
to see the stack trace.)Possible Solution
Some possible solutions:
AWS_USE_FIPS_ENDPOINT
oruse_fips_endpoint
global options are set.config
file.--endpoint-url
to handle Virtual Host-Only addresses to accommodate the FIPS limitation.Additional Information/Context
No response
CLI version used
aws-cli/2.15.37 Python/3.11.8 Linux/6.5.0-9021-oem exe/x86_64.ubuntu.22 prompt/off
Environment details (OS name and version, etc.)
Ubuntu with Linux 6.5.0 x86_64