porting to changes in gcube-security
This commit is contained in:
parent
ac94d42dd8
commit
db11acc925
|
@ -82,7 +82,7 @@ public class EServiceManager {
|
||||||
}
|
}
|
||||||
|
|
||||||
public void addEServiceToCurrentContext() throws ResourceNotFoundException, ContextNotFoundException, ResourceRegistryException {
|
public void addEServiceToCurrentContext() throws ResourceNotFoundException, ContextNotFoundException, ResourceRegistryException {
|
||||||
Secret secret = SecretManagerProvider.instance.get();
|
Secret secret = SecretManagerProvider.get();
|
||||||
String context = secret.getContext();
|
String context = secret.getContext();
|
||||||
UUID contextUUID = ContextUtility.getContextUUID(context);
|
UUID contextUUID = ContextUtility.getContextUUID(context);
|
||||||
|
|
||||||
|
@ -93,7 +93,7 @@ public class EServiceManager {
|
||||||
for (String c : contexts) {
|
for (String c : contexts) {
|
||||||
if(c.compareTo(context)!=0) {
|
if(c.compareTo(context)!=0) {
|
||||||
Secret s = authorizationProvider.getSecretForContext(c);
|
Secret s = authorizationProvider.getSecretForContext(c);
|
||||||
SecretManagerProvider.instance.set(s);
|
SecretManagerProvider.set(s);
|
||||||
anotherContextSet = true;
|
anotherContextSet = true;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -114,7 +114,7 @@ public class EServiceManager {
|
||||||
|
|
||||||
|
|
||||||
public void addHostingNodeToCurrentContext() throws ResourceNotFoundException, ContextNotFoundException, ResourceRegistryException {
|
public void addHostingNodeToCurrentContext() throws ResourceNotFoundException, ContextNotFoundException, ResourceRegistryException {
|
||||||
Secret secret = SecretManagerProvider.instance.get();
|
Secret secret = SecretManagerProvider.get();
|
||||||
String context = secret.getContext();
|
String context = secret.getContext();
|
||||||
UUID contextUUID = ContextUtility.getContextUUID(context);
|
UUID contextUUID = ContextUtility.getContextUUID(context);
|
||||||
|
|
||||||
|
@ -125,7 +125,7 @@ public class EServiceManager {
|
||||||
for (String c : contexts) {
|
for (String c : contexts) {
|
||||||
if(c.compareTo(context)!=0) {
|
if(c.compareTo(context)!=0) {
|
||||||
Secret s = authorizationProvider.getSecretForContext(c);
|
Secret s = authorizationProvider.getSecretForContext(c);
|
||||||
SecretManagerProvider.instance.set(s);
|
SecretManagerProvider.set(s);
|
||||||
anotherContextSet = true;
|
anotherContextSet = true;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -157,7 +157,7 @@ public class EServiceManager {
|
||||||
|
|
||||||
public void removeFromCurrentContext()
|
public void removeFromCurrentContext()
|
||||||
throws ResourceNotFoundException, ContextNotFoundException, ResourceRegistryException {
|
throws ResourceNotFoundException, ContextNotFoundException, ResourceRegistryException {
|
||||||
Secret secret = SecretManagerProvider.instance.get();
|
Secret secret = SecretManagerProvider.get();
|
||||||
String context = secret.getContext();
|
String context = secret.getContext();
|
||||||
UUID uuid = UUID.fromString(applicationContext.container().id());
|
UUID uuid = UUID.fromString(applicationContext.container().id());
|
||||||
try {
|
try {
|
||||||
|
|
|
@ -114,7 +114,7 @@ public class HostingNodeManager {
|
||||||
}
|
}
|
||||||
|
|
||||||
public void addToCurrentContext() throws ResourceNotFoundException, ContextNotFoundException, ResourceRegistryException {
|
public void addToCurrentContext() throws ResourceNotFoundException, ContextNotFoundException, ResourceRegistryException {
|
||||||
Secret secret = SecretManagerProvider.instance.get();
|
Secret secret = SecretManagerProvider.get();
|
||||||
String context = secret.getContext();
|
String context = secret.getContext();
|
||||||
UUID contextUUID = ContextUtility.getContextUUID(context);
|
UUID contextUUID = ContextUtility.getContextUUID(context);
|
||||||
|
|
||||||
|
@ -125,7 +125,7 @@ public class HostingNodeManager {
|
||||||
for (String c : contexts) {
|
for (String c : contexts) {
|
||||||
if(c.compareTo(context)!=0) {
|
if(c.compareTo(context)!=0) {
|
||||||
Secret s = authorizationProvider.getSecretForContext(c);
|
Secret s = authorizationProvider.getSecretForContext(c);
|
||||||
SecretManagerProvider.instance.set(s);
|
SecretManagerProvider.set(s);
|
||||||
anotherContextSet = true;
|
anotherContextSet = true;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -157,7 +157,7 @@ public class HostingNodeManager {
|
||||||
|
|
||||||
public void removeFromCurrentContext()
|
public void removeFromCurrentContext()
|
||||||
throws ResourceNotFoundException, ContextNotFoundException, ResourceRegistryException {
|
throws ResourceNotFoundException, ContextNotFoundException, ResourceRegistryException {
|
||||||
Secret secret = SecretManagerProvider.instance.get();
|
Secret secret = SecretManagerProvider.get();
|
||||||
String context = secret.getContext();
|
String context = secret.getContext();
|
||||||
UUID uuid = UUID.fromString(containerContext.id());
|
UUID uuid = UUID.fromString(containerContext.id());
|
||||||
try {
|
try {
|
||||||
|
|
|
@ -57,8 +57,8 @@ public class ContextTest {
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void set(Secret secret) throws Exception {
|
public static void set(Secret secret) throws Exception {
|
||||||
SecretManagerProvider.instance.reset();
|
SecretManagerProvider.reset();
|
||||||
SecretManagerProvider.instance.set(secret);
|
SecretManagerProvider.set(secret);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void setContextByName(String fullContextName) throws Exception {
|
public static void setContextByName(String fullContextName) throws Exception {
|
||||||
|
@ -79,7 +79,7 @@ public class ContextTest {
|
||||||
|
|
||||||
@AfterClass
|
@AfterClass
|
||||||
public static void afterClass() throws Exception {
|
public static void afterClass() throws Exception {
|
||||||
SecretManagerProvider.instance.reset();
|
SecretManagerProvider.reset();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue