jclouds-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ignasi Barrera <notificati...@github.com>
Subject Re: [jclouds/jclouds] Use separate credential stores per context (#1119)
Date Thu, 13 Jul 2017 08:18:08 GMT
I'm not sure we should fix it this way and remove the static. The default static backing map
was chosen as a practical way to provide some basic "credential persistence" and allow credentials
to be cached and survive context creation/destruction, which is convenient in many cases.

There is a trivial configuration to be applied when you need context isolation. Just create
the context with a `CredentialStoreModule` initialized with a local `Map`. It has a public
constructor just for this purpose.

```java
Module isolatedCredStore = new CredentialStoreModule(new ConcurrentHashMap<String, ByteSource>());

ContextBuilder.newBuilder("provider")
   .modules(ImmutableSet.of(isolatedCredStore, ...))
   ...
```

I think the current default is a good compromise of convenience vs conflicting use cases (since
most users will be using one single account for each provider), and the existing implementation
already provides a clean way to isolate the credential store between contexts. I don't see
the need to change that default.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/1119#issuecomment-315006631
Mime
View raw message