mirror of
https://github.com/eclipse-sailing-analytics/sailing-analytics.git
synced 2026-11-06 02:52:22 +00:00
renamed sharedAcrossSubdomains to sharedAcrossSubdomainsOf
This commit is contained in:
1 parent
31f0e719f1
commit
d69bf17769
5 files changed
+17
-17
No files matched your search
@@ -26,7 +26,7 @@
|
||||
<li>Added system property <tt>security.sharedAcrossSubdomains</tt> which can be used to
|
||||
configure the security service as shared across several subdomains of the parent
|
||||
domain specified by the system property. Use, e.g., as in<pre>
|
||||
-Dsecurity.sharedAcrossSubdomains=sapsailing.com
|
||||
-Dsecurity.sharedAcrossSubdomainsOf=sapsailing.com
|
||||
</pre>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
@@ -631,6 +631,6 @@ public interface SecurityService extends ReplicableWithObjectInputStream<Replica
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
String getSharedAcrossSubdomains();
|
||||
String getSharedAcrossSubdomainsOf();
|
||||
|
||||
}
|
||||
@@ -47,7 +47,7 @@ public class SecurityWebSessionManager extends DefaultWebSessionManager {
|
||||
super();
|
||||
getSessionIdCookie().setPath(Cookie.ROOT_PATH);
|
||||
final Thread backgroundThreadWaitingForSecurityServiceToObtainSharedAcrossSubdomains = new Thread(()->{
|
||||
final String domainForSecurityServiceSharing = Activator.getSecurityService().getSharedAcrossSubdomains();
|
||||
final String domainForSecurityServiceSharing = Activator.getSecurityService().getSharedAcrossSubdomainsOf();
|
||||
if (domainForSecurityServiceSharing != null) {
|
||||
getSessionIdCookie().setDomain(domainForSecurityServiceSharing);
|
||||
}
|
||||
|
||||
@@ -64,7 +64,7 @@ public class Activator implements BundleActivator {
|
||||
|
||||
private ServiceTracker<AccessControlStore, AccessControlStore> accessControlStoreTracker;
|
||||
|
||||
public static final String SHARED_ACROSS_SUBDOMAINS_PROPERTY_NAME = "security.sharedAcrossSubdomains";
|
||||
public static final String SHARED_ACROSS_SUBDOMAINS_OF_PROPERTY_NAME = "security.sharedAcrossSubdomainsOf";
|
||||
/**
|
||||
* Should be {@code null} if the security service instantiated by the bundle activated by this activator is not
|
||||
* shared across different sub-domains; otherwise, the parent domain across which the security service and its
|
||||
@@ -72,9 +72,9 @@ public class Activator implements BundleActivator {
|
||||
* <p>
|
||||
*
|
||||
* The value can be specified by a system property whose name is provided by
|
||||
* {@link #SHARED_ACROSS_SUBDOMAINS_PROPERTY_NAME}.
|
||||
* {@link #SHARED_ACROSS_SUBDOMAINS_OF_PROPERTY_NAME}.
|
||||
*/
|
||||
private final String sharedAcrossSubdomains;
|
||||
private final String sharedAcrossSubdomainsOf;
|
||||
|
||||
public static void setTestStores(UserStore theTestUserStore, AccessControlStore theTestAccessControlStore) {
|
||||
testUserStore = theTestUserStore;
|
||||
@@ -100,7 +100,7 @@ public class Activator implements BundleActivator {
|
||||
}
|
||||
|
||||
public Activator() {
|
||||
sharedAcrossSubdomains = System.getProperty(SHARED_ACROSS_SUBDOMAINS_PROPERTY_NAME);
|
||||
sharedAcrossSubdomainsOf = System.getProperty(SHARED_ACROSS_SUBDOMAINS_OF_PROPERTY_NAME);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -150,7 +150,7 @@ public class Activator implements BundleActivator {
|
||||
hasPermissionsProviderTracker.open();
|
||||
SecurityServiceImpl initialSecurityService = new SecurityServiceImpl(
|
||||
ServiceTrackerFactory.createAndOpen(context, MailService.class), userStore, accessControlStore,
|
||||
new OSGIHasPermissionsProvider(hasPermissionsProviderTracker), sharedAcrossSubdomains);
|
||||
new OSGIHasPermissionsProvider(hasPermissionsProviderTracker), sharedAcrossSubdomainsOf);
|
||||
initialSecurityService.initialize();
|
||||
securityService.complete(initialSecurityService);
|
||||
registration = context.registerService(SecurityService.class.getName(), initialSecurityService, null);
|
||||
|
||||
@@ -186,7 +186,7 @@ public class SecurityServiceImpl implements ReplicableSecurityService, ClearStat
|
||||
|
||||
private final HasPermissionsProvider hasPermissionsProvider;
|
||||
|
||||
private String sharedAcrossSubdomains;
|
||||
private String sharedAcrossSubdomainsOf;
|
||||
|
||||
static {
|
||||
shiroConfiguration = new Ini();
|
||||
@@ -219,7 +219,7 @@ public class SecurityServiceImpl implements ReplicableSecurityService, ClearStat
|
||||
*/
|
||||
public SecurityServiceImpl(ServiceTracker<MailService, MailService> mailServiceTracker, UserStore userStore,
|
||||
AccessControlStore accessControlStore, HasPermissionsProvider hasPermissionsProvider) {
|
||||
this(mailServiceTracker, userStore, accessControlStore, hasPermissionsProvider, /* isSharedAcrossSubdomains */ null);
|
||||
this(mailServiceTracker, userStore, accessControlStore, hasPermissionsProvider, /* sharedAcrossSubdomainsOf */ null);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -229,10 +229,10 @@ public class SecurityServiceImpl implements ReplicableSecurityService, ClearStat
|
||||
* be shared as well.
|
||||
*/
|
||||
public SecurityServiceImpl(ServiceTracker<MailService, MailService> mailServiceTracker, UserStore userStore,
|
||||
AccessControlStore accessControlStore, HasPermissionsProvider hasPermissionsProvider, String sharedAcrossSubdomains) {
|
||||
AccessControlStore accessControlStore, HasPermissionsProvider hasPermissionsProvider, String sharedAcrossSubdomainsOf) {
|
||||
logger.info("Initializing Security Service with user store " + userStore);
|
||||
operationsSentToMasterForReplication = new HashSet<>();
|
||||
this.sharedAcrossSubdomains = sharedAcrossSubdomains;
|
||||
this.sharedAcrossSubdomainsOf = sharedAcrossSubdomainsOf;
|
||||
this.operationExecutionListeners = new ConcurrentHashMap<>();
|
||||
this.store = userStore;
|
||||
this.accessControlStore = accessControlStore;
|
||||
@@ -2085,8 +2085,8 @@ public class SecurityServiceImpl implements ReplicableSecurityService, ClearStat
|
||||
Thread.currentThread().setContextClassLoader(oldCCL);
|
||||
}
|
||||
logger.info("Reading isSharedAcrossSubdomains...");
|
||||
sharedAcrossSubdomains = (String) is.readObject();
|
||||
logger.info("...as "+sharedAcrossSubdomains);
|
||||
sharedAcrossSubdomainsOf = (String) is.readObject();
|
||||
logger.info("...as "+sharedAcrossSubdomainsOf);
|
||||
logger.info("Done filling SecurityService");
|
||||
}
|
||||
|
||||
@@ -2095,7 +2095,7 @@ public class SecurityServiceImpl implements ReplicableSecurityService, ClearStat
|
||||
objectOutputStream.writeObject(cacheManager);
|
||||
objectOutputStream.writeObject(store);
|
||||
objectOutputStream.writeObject(accessControlStore);
|
||||
objectOutputStream.writeObject(sharedAcrossSubdomains);
|
||||
objectOutputStream.writeObject(sharedAcrossSubdomainsOf);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -2456,7 +2456,7 @@ public class SecurityServiceImpl implements ReplicableSecurityService, ClearStat
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getSharedAcrossSubdomains() {
|
||||
return sharedAcrossSubdomains;
|
||||
public String getSharedAcrossSubdomainsOf() {
|
||||
return sharedAcrossSubdomainsOf;
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user