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

Testing/obj-storage-mock: add dummy assume-role endpoint #8288

Merged
merged 1 commit into from Apr 4, 2024

Conversation

snazy
Copy link
Member

@snazy snazy commented Apr 3, 2024

No description provided.

@FormParam("Policy") String policy,
@FormParam("DurationSeconds") Integer durationSeconds,
@FormParam("ExternalId") String externalId,
@FormParam("SerialNumber") String serialNumber,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems SerialNumber is only for MFA, and also requires TokenCode. Not sure this is needed for testing STS.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is testing code - we can change and adopt later at any time.

@POST
@Consumes(MediaType.APPLICATION_FORM_URLENCODED)
@Produces(MediaType.APPLICATION_XML)
public Object assumeRole(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I noticed we don't support SourceIdentity, is it worth adding it?

@Inject ObjectStorageMock mockServer;

@Path("assumeRole")
@POST
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

According to this doc the original STS endpoint uses GET + query parameters.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

According to this doc the original STS endpoint uses GET + query parameters.

The awssdk actually uses POST + form

@snazy snazy requested a review from adutra April 4, 2024 12:48
@snazy snazy merged commit 9a0401a into projectnessie:main Apr 4, 2024
16 checks passed
@snazy snazy deleted the obj-store-sts branch April 4, 2024 14:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants