Commit Graph
258 Commits
Author SHA1 Message Date
Thomas Wiese 6ba0639dee Bug 5270: Cleaning MongoDb collections of security domain objects on
clear state for running tests with a clean state
2020-05-19 18:36:45 +02:00
dmitry 18215f82ad Merge branch 'bug5221' into bug4964 2020-05-14 10:28:38 +03:00
dmitry d7b3664322 bug4964: Remove unused methods in SailingService 2020-05-14 10:23:14 +03:00
Axel Uhl b67eac203a made AbstractGenericSerializableSettings.addChildSettings abstract, resolving an old TODO; some formatting changes 2020-05-13 11:10:35 +02:00
Steffen Schaefer 136ad679d4 Merge branch 'master' into bug5239
Conflicts:
	java/com.sap.sse.security/src/com/sap/sse/security/impl/SecurityServiceImpl.java
2020-03-31 09:45:08 +02:00
Axel Uhl 19b2088ccf Merge branch 'master' into bug5154 2020-03-24 17:47:14 +01:00
Axel Uhl 31a9dde1ce use background(false) for all MongoDB IndexOptions to avoid problems with dropping;
when trying to drop an index or an entire collection while a background
index construction is running, an exception will be thrown by the Mongo
driver. Executing all index creations in the foreground will keep this
from happening
2020-03-23 18:32:26 +01:00
Axel Uhl d9404c49a6 Merge branch 'master' into bug5154 2020-03-23 11:47:32 +01:00
Steffen Schaefer 8b4b0e3601 Bug 5239: Reduced codepaths that potentially add denied ACL entries 2020-03-20 16:08:17 +01:00
Axel Uhl 4747c8f331 bug4006: started to introduce a ReplicationStartingListener on ReplicationService 2020-03-06 16:11:55 +01:00
Axel Uhl 51a86ad577 bug5154: preparing for race status check when reconciling competitor status 2020-03-05 10:54:22 +01:00
Axel Uhl 2b1edbd243 added a missing @Override for new UserStoreImpl method 2020-02-12 16:39:31 +01:00
Steffen Schaefer 341abf655f Bug 5195: Several adjustments to ensure consistent usage of
RoleDefinitions for RolePrototypes in the security model to prevent
incompatible usages of objects that effectively represent the same
RoleDefinition.
2020-02-11 13:04:30 +01:00
Axel Uhl 99a04487b1 bug5193: adjusting server group in UserStore after receiving initial load 2020-02-03 18:47:06 +01:00
Axel Uhl 7f86a28cbf bug4006: fixed remaining tests 2020-01-29 20:06:48 +01:00
Axel Uhl 4cbf92e796 fixed bug in AccessControlStore regarding adding to ACLs 2020-01-29 12:28:28 +01:00
Axel Uhl 944a7e5873 Merge branch 'master' into bug5085 2019-12-13 12:28:16 +01:00
Axel Uhl 03c8526c74 first green test for simple user and group merge 2019-12-02 12:40:35 +01:00
Axel Uhl 0dda3fd7a9 added test fragment for com.sap.sse.security.storemerging 2019-11-19 18:00:30 +01:00
Axel Uhl 44d05c4fb4 bug4006: created a first stub for user/accesscontrolstore merging 2019-11-19 17:07:31 +01:00
Steffen Schaefer 11a75b2e8c Bug 5085: Renamed WithQualifiedObjectIdentifier.getType to
WithQualifiedObjectIdentifier.getPermissionType
2019-08-13 10:37:33 +02:00
Axel Uhl 82786a38ae fixed initialization of AccessControlStore internal structures after initial load;
the userToOwnership and userGroupToOwnership structures weren't
correctly filled because of a missing call to
internalSetOwnershipAndMapUserAndUserGroupToOwnership for cleanly
updating the internal structures. This caused problems when deleting
users or groups in replication scenarios.

Change-Id: I656090242d40e9792a46835440eaf6865f3434a7
2019-06-27 00:24:29 +02:00
Kai Börnert bc4282cd8b bug4905 cleanup qualified roles 2019-03-14 12:45:00 +01:00
Steffen Jacobs 6a90fefd9e Bug 4926: adjusted AccessControlStorImpl to have a dummy element
NULL_GROUP
to prevent NPE when accessing ConcurrentHashMap
2019-02-28 11:07:31 +01:00
Steffen Jacobs fc72cc4b56 Bug 4926: added null checks to prevent NPE when handling ACLs for the
null user
group
2019-02-28 11:07:29 +01:00
Axel Uhl c4f31460a7 fixed getIdentifier implementation of RoleDefinition/RolePrototype;
added tests; remove default constructor from
TypeRelativeObjectIdentifier to avoid confusion; introduced a custom
field serializer instead and use it in QualifiedObjectIdentifierImpl's
custom field serializers.

Change-Id: If6057c21771a8488581ef9f6b401e09ec1b6a8cc
2019-02-27 17:30:09 +01:00
Axel Uhl 61ae8c447d removed @SuppressWarnings and replaced List<Object> casts by List<?>
Change-Id: I7e11e84bca36c04fd487d9f11484ba8701f6b0fe
2019-02-22 13:48:55 +01:00
Axel Uhl cbf69bfc4d improve variable name
Change-Id: Iab13dc3c58a3104af4431a0a9e3af934dfe43694
2019-02-22 11:21:33 +01:00
Axel Uhl 9dc02945b4 switched userstore.mongodb bundle to Java-8 (why was it on 7 in the first place?)
Change-Id: Iaf49f243dad6fcce8b16bdea0b2e53a945bb7f2e
2019-02-22 11:05:04 +01:00
Axel Uhl b5bfdf6f73 Merge remote-tracking branch 'server/permission-vertical' into permission-vertical
Change-Id: If8f68ba771d9dc17b57c4312b13787cc0588f6fa
2019-02-21 13:25:31 +01:00
Axel Uhl 7bfddc6926 refactored User-related methods on SecurityService to avoid sending User objects through replication operations;
this way, no patching of the userGroupProvider property after
de-serialization is necessary, and no replacement of a User object in
the UserStore should ever happen.

Change-Id: I23a8ae53b6a53ca89a2a0b8a11dc779f4034db57
2019-02-21 13:21:04 +01:00
Kai Börnert 3a65aa40c3 Ensure that already escaped identifiers that are stored in the Database
will not be escaped again on loading, adjusted test to contain some of
the original offenders
2019-02-21 13:15:48 +01:00
Axel Uhl e64e708008 expose userGroupProvider property on User; align in UserStoreImpl for de-serialized copies
Change-Id: I0d520d2b8d19ceb2405d1c1c289d0f839600eb6f
2019-02-20 19:08:13 +01:00
Steffen Schaefer e4e21267e6 Merge branch 'master' into permission-vertical 2019-02-18 11:34:49 +01:00
Axel Uhl 9ee2893878 it's not a DuplicateKeyException but a MongoCommandException that is being thrown upon duplicate keys
Change-Id: Ida31ff84ed657916961953ac470c970cbf2220a2
2019-02-18 10:47:59 +01:00
Steffen Schaefer 0a6775d901 com.sap.sse.security.userstore.mongodb does not depend on
com.sap.sse.security anymore
2019-02-14 08:27:50 +01:00
Steffen Schaefer f1bce79592 Moved several classes from com.sap.sse.security to
com.sap.sse.security.interface to allow
com.sap.sse.security.userstore.mongodb to to depend on
com.sap.sse.security anymore
2019-02-14 08:27:28 +01:00
Steffen Jacobs 35e99327af Bug 4896: updated security checks on get/create access tokens to use
permission USER:GET:<name> and USER:UPDATE:<name> instead of check for
admin role
2019-02-13 12:47:27 +01:00
Steffen Schaefer 7c9921a786 The admin user will now get global admin role instead of a scoped one
during migration to permission-vertical. This ensures that at least one
user will be able to manage global configurations. In addition this is
consistent behavior compared to new servers.
2019-02-11 19:06:35 +01:00
Steffen Schaefer 8c0c6086ea Moved migration code to sse.security bundle because it requires the
SecurityService which is not hosted in sse.security.userstore.mongodb
bundle. This will most probably resolve cycles between several bundles.
2019-02-11 17:39:17 +01:00
Steffen Schaefer 49db29334b Not migrating default creation tenant when loading users. Tenant will be
explicitly created during explicit migration after object cycles are
restored.
2019-02-11 16:53:06 +01:00
Steffen Schaefer 2a19976d76 Existing users will now get a tenant during migration if the user is
assumed to not be migrated by now. There are corner cases that will
trigger tenant creation again but this is a rare case that most probably
won't happen intentionally. In addition, creation of the user's tenant
will not create additional permissions for any previously existing
objects.
2019-02-11 16:27:25 +01:00
Steffen Schaefer 3868019c0d Default creation tenant isn't set on user creation anymore. This helps
to resolve issues with the creation order of Users and UserGroups as
well as migration issues. In addition this simplifies the setup of
several test cases.
2019-02-11 16:10:13 +01:00
Steffen Schaefer 7ff340aca3 Added migration code to be able to replace old permissions with newer
replacements. In case sailing specific replacements are necessary, we
need to think about an improved version that can obtain replacements
through OSGi registry.
2019-02-11 14:51:20 +01:00
Steffen Schaefer ec9da1a992 Migrated users are now owned by themselves as new users would be 2019-02-11 13:28:12 +01:00
Steffen Schaefer b9a2e73899 Merge branch 'master' into permission-vertical
Conflicts:
	java/com.sap.sailing.gwt.ui/src/main/java/com/sap/sailing/gwt/ui/server/SailingServiceImpl.java
	java/com.sap.sse.security.userstore.mongodb/src/com/sap/sse/security/userstore/mongodb/impl/MongoObjectFactoryImpl.java
2019-02-07 07:52:55 +01:00
Axel Uhl c6168e1135 obtain SETTINGS collection only once, creating a UNIQUE index over the username if possible, warning if not
Change-Id: I07a0f8bbe878648dc8cde6a28f4726f69a04580f
2019-02-06 16:06:32 +01:00
Steffen Schaefer 8966607a4a ACLs and Ownerships are now loaded asynchronously to ensure that Users
and UserGroups are loaded before trying to resolve object references
2019-02-04 16:50:56 +01:00
Steffen Schaefer a0afc56146 Fixed infinite recursion when saving roles associated to a group 2019-02-04 16:19:17 +01:00
Steffen Schaefer 42ea70f2aa Merge branch 'master' into permission-vertical
Conflicts:
	java/com.sap.sailing.domain.persistence/META-INF/MANIFEST.MF
	java/com.sap.sailing.domain.swisstimingadapter.persistence/META-INF/MANIFEST.MF
	java/com.sap.sailing.domain.swisstimingadapter.test/META-INF/MANIFEST.MF
	java/com.sap.sailing.domain.tractracadapter.persistence/META-INF/MANIFEST.MF
	java/com.sap.sailing.server.replication.test/META-INF/MANIFEST.MF
	java/com.sap.sailing.server.testsupport/META-INF/MANIFEST.MF
	java/com.sap.sailing.server/META-INF/MANIFEST.MF
	java/com.sap.sse.security.persistence/META-INF/MANIFEST.MF
	java/com.sap.sse.security.test/META-INF/MANIFEST.MF
	java/com.sap.sse.security.userstore.mongodb/META-INF/MANIFEST.MF
2019-01-28 09:58:30 +01:00