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

[JENKINS-65127] Support IMDSv2 configuration #609

Merged
merged 4 commits into from Aug 1, 2021

Conversation

warrior8792
Copy link
Contributor

Add metadata configuration options in the Advanced section

  • Make sure you are opening from a topic/feature/bugfix branch (right side) and not your master branch!
  • Ensure that the pull request title represents the desired changelog entry
  • Please describe what you did
  • Link to relevant issues in GitHub or Jira
  • Link to relevant pull requests, esp. upstream and downstream changes
  • Ensure you have provided tests - that demonstrates feature works or fixes the issue

Add metadata configuration options in the Advanced section
@warrior8792
Copy link
Contributor Author

New fields added in the advanced section

Screenshot_2021-05-04 Configure Clouds  Jenkins

@res0nance res0nance self-requested a review May 13, 2021 15:18
@@ -224,6 +230,12 @@

public EbsEncryptRootVolume ebsEncryptRootVolume;

public Boolean metadataEndpointEnabled;
Copy link
Contributor

Choose a reason for hiding this comment

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

AFAICT these can be made private.

I should find a way to private the rest of these variables as well.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Made these private and added getters

@avivek
Copy link

avivek commented Jun 6, 2021

Looking forward to this feature.

@avivek
Copy link

avivek commented Jun 6, 2021

Also another question is the EC2 plugin's behaviour on the master.
The master is attached with instance profile and in such a case will this plugin use the IMDSv2 instead of V1 to obtain credentials and such.
The AWS java sdk would use IMDSv2 if available yet something to look out for.

@res0nance res0nance added the enhancement Feature additions or enhancements label Jun 10, 2021
@@ -104,6 +108,10 @@
public final Tenancy tenancy;
private String instanceType;

public final Boolean metadataEndpointEnabled;
Copy link
Contributor

Choose a reason for hiding this comment

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

can you make these field private?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

<f:entry title="${%Metadata Require HTTP Tokens}" field="metadataTokensRequired">
<f:checkbox default="false"/>
</f:entry>
<f:entry title="${%Metadata Put Response Hop Limit}" field="metadataHopsLimit">
Copy link
Contributor

Choose a reason for hiding this comment

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

Are there any restrictions to the value in this field?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

1-64 per Amazon. ae7ba08

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Feature additions or enhancements
Projects
None yet
3 participants