Page MenuHomePhabricator

Add support for instance profile credentials
AbandonedPublic

Authored by joshuaspence on Jun 30 2014, 3:11 AM.
Tags
None
Referenced Files
F13082532: D9782.diff
Wed, Apr 24, 10:11 PM
Unknown Object (File)
Thu, Apr 11, 8:07 AM
Unknown Object (File)
Mon, Apr 1, 10:07 AM
Unknown Object (File)
Fri, Mar 29, 2:11 PM
Unknown Object (File)
Mar 23 2024, 10:23 PM
Unknown Object (File)
Mar 22 2024, 9:22 PM
Unknown Object (File)
Mar 4 2024, 8:37 PM
Unknown Object (File)
Feb 8 2024, 12:37 AM
Subscribers

Details

Summary

Ref T5155. Add support for instance profile credentials to PhutilAWSFuture. This should allow the use of instance profile credentials (provided by the EC2 role) instead of specifying an access key and corresponding private key. This was based on https://github.com/aws/aws-sdk-php/blob/master/src/Aws/Common/InstanceMetadata/InstanceMetadataClient.php.

Test Plan

This is not yet tested, and I'm not quite sure how to test this. I think we should probably write some unit tests here.

Diff Detail

Repository
rPHU libphutil
Branch
aws-token
Lint
Lint Warnings
SeverityLocationCodeMessage
Warningsrc/future/aws/PhutilAWSFuture.php:184TXT3Line Too Long
Unit
Tests Passed
Build Status
Buildable 2596
Build 2600: [Placeholder Plan] Wait for 30 Seconds

Event Timeline

joshuaspence retitled this revision from to Add support for instance profile credentials.
joshuaspence updated this object.
joshuaspence edited the test plan for this revision. (Show Details)
joshuaspence added a reviewer: epriestley.

This is basically-but-not-quite ready. Specifically, I am not sure exactly how/when we should use the instance profile credentials. Some possibilities are:

  1. Add a useInstanceProfileCredentials method to turn this behavior on/off.
  2. Attempt to use instance profile credentials whenever a keypair hasn't been explicitly provided.
  3. Something else?

Looks generally reasonable to me.

Offhand, I think we should probably make the API here explicit (e.g., an explicit method to activate instance credential use), and then maybe make higher layers do the little "use a certificate if it exists, or try instance credentials if it doesn't" dance, if that seems reasonable?

src/future/aws/PhutilAWSFuture.php
168–173

This should probably be implode?

Not sure about the context for the abandon, I imagine I'll dig that up...

Oh sorry, I should've commented. See D10530 instead