File tree Expand file tree Collapse file tree 2 files changed +8
-3
lines changed
core/src/main/java/ch/cyberduck/core
s3/src/main/java/ch/cyberduck/core/s3 Expand file tree Collapse file tree 2 files changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -685,6 +685,9 @@ public Map<String, String> getProperties() {
685685 property -> StringUtils .contains (property , '=' ) ? substitutor .replace (StringUtils .substringAfter (property , '=' )) : StringUtils .EMPTY )));
686686 // In profile as dict
687687 properties .putAll (this .map (PROPERTIES_KEY ));
688+ if (null != this .getContext ()) {
689+ properties .put (CONTEXT_KEY , this .getContext ());
690+ }
688691 return properties ;
689692 }
690693
Original file line number Diff line number Diff line change 2727import ch .cyberduck .core .LoginCallback ;
2828import ch .cyberduck .core .Path ;
2929import ch .cyberduck .core .PathContainerService ;
30+ import ch .cyberduck .core .Profile ;
3031import ch .cyberduck .core .Scheme ;
3132import ch .cyberduck .core .TemporaryAccessTokens ;
3233import ch .cyberduck .core .UrlProvider ;
@@ -264,10 +265,11 @@ protected S3CredentialsStrategy configureCredentialsStrategy(final HttpClientBui
264265 }
265266 if (S3Session .isAwsHostname (host .getHostname ())) {
266267 // Try auto-configure
267- if (Scheme .isURL (host .getProtocol ().getContext ())) {
268- log .debug ("Auto-configure credentials from instance metadata {}" , host .getProtocol ().getContext ());
268+ final String context = preferences .getProperty (Profile .CONTEXT_KEY );
269+ if (Scheme .isURL (context )) {
270+ log .debug ("Auto-configure credentials from HTTP endpoint {}" , context );
269271 // Fetch temporary session token from instance metadata
270- return new AWSSessionCredentialsRetriever (trust , key , host . getProtocol (). getContext () );
272+ return new AWSSessionCredentialsRetriever (trust , key , context );
271273 }
272274 }
273275 if (host .getProtocol ().isRoleConfigurable ()) {
You can’t perform that action at this time.
0 commit comments