Skip to content

fix(middleware-sdk-s3-control): do not validate for FIPS in S3 Outposts #3027

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

Merged
merged 2 commits into from
Nov 18, 2021

Conversation

trivikr
Copy link
Member

@trivikr trivikr commented Nov 15, 2021

Issue

Fixes: #3026
This was missed in #2985

Description

Remove validation for FIPS in S3 Outposts Control Plane

Testing

  • Unit testing
  • Verified with the code from bug report
Code
import { S3Control } from "../aws-sdk-js-v3/clients/client-s3-control/dist-cjs/index.js";

const logHostnameMiddleware = (next) => async (args) => {
  console.log({ hostname: args.request.hostname });
  return next(args);
};
const logHostnameMiddlewareOptions = { step: "deserialize" };

const region = "us-gov-west-1";
const useFipsEndpoint = true;
const AccountId = "123456789012";
const Bucket = `arn:aws-us-gov:s3-outposts:${region}:${AccountId}:outpost:outpostName:bucket:bucketName`;

const client = new S3Control({ region, useFipsEndpoint });
client.middlewareStack.add(logHostnameMiddleware, logHostnameMiddlewareOptions);

await client.getBucket({ AccountId, Bucket });
Output
{ hostname: 's3-outposts-fips.us-gov-west-1.amazonaws.com' }

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@codecov-commenter
Copy link

codecov-commenter commented Nov 15, 2021

Codecov Report

Merging #3027 (da86085) into main (179afb9) will not change coverage.
The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##             main    #3027   +/-   ##
=======================================
  Coverage   58.76%   58.76%           
=======================================
  Files         567      567           
  Lines       30360    30360           
  Branches     7483     7482    -1     
=======================================
  Hits        17841    17841           
  Misses      12519    12519           
Impacted Files Coverage Δ
.../process-arnables-plugin/parse-outpost-arnables.ts 97.05% <ø> (ø)
.../src/process-arnables-plugin/getOutpostEndpoint.ts 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 179afb9...da86085. Read the comment docs.

@trivikr trivikr marked this pull request as ready for review November 15, 2021 23:43
@trivikr trivikr requested a review from a team as a code owner November 15, 2021 23:43
@trivikr trivikr requested a review from AllanZhengYP November 16, 2021 20:03
@trivikr trivikr merged commit b30d338 into aws:main Nov 18, 2021
@trivikr trivikr deleted the fix-fips-s3-control branch November 18, 2021 00:51
@github-actions
Copy link

github-actions bot commented Dec 3, 2021

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs and link to relevant comments in this thread.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Dec 3, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

FIPS is not supported in S3 Outposts Control Plane
3 participants