]> git.aero2k.de Git - tmp/jakarta-migration.git/commit
CSPACE-642 a user on login is associated with a tenant
authorSanjay Dalal <sanjay.dalal@berkeley.edu>
Tue, 1 Dec 2009 21:45:08 +0000 (21:45 +0000)
committerSanjay Dalal <sanjay.dalal@berkeley.edu>
Tue, 1 Dec 2009 21:45:08 +0000 (21:45 +0000)
commit673137edf7635c19786713b200a44f1fca545d06
tree67e27cf4304ff78dcc7f947986ab5997d72ac899
parent46f4f23673e7d87b0153f83b404f3ee920103adb
CSPACE-642 a user on login is associated with a tenant
Account service now associates a user with tenant on account creation time if default identity provider is used. This association is retrieved (CSpacePrincipal) at the time of login. Tenant binding is retrieved using the tenant id established after login.
Moved db schema for default id provider to authentication/client.
Introduced ServiceException to capture error code and error reason. UnauthorizedException with 401 (derived from ServiceException) is thrown if tenant could not be found on login. Rest of the common exceptions are derived from ServiceException. Service resources changed to handle UnauthorizedException.

test: authentication client with security enabled on server (web.xml), all service tests without security
34 files changed:
pom.xml
services/account/service/src/main/java/org/collectionspace/services/account/AccountResource.java
services/account/service/src/main/java/org/collectionspace/services/account/storage/AccountStorageClient.java
services/acquisition/service/src/main/java/org/collectionspace/services/acquisition/AcquisitionResource.java
services/authentication/build.xml
services/authentication/client/build.xml [new file with mode: 0644]
services/authentication/client/pom.xml
services/authentication/client/src/main/resources/db/mysql/authentication.sql [new file with mode: 0644]
services/authentication/client/src/main/resources/db/mysql/test_authn.sql [new file with mode: 0644]
services/authentication/client/src/test/resources/META-INF/persistence.xml [new file with mode: 0644]
services/authentication/client/src/test/resources/hibernate.cfg.xml [new file with mode: 0644]
services/authentication/jaxb/src/main/resources/authentication_identity_provider.xsd
services/authentication/service/build.xml
services/authentication/service/pom.xml
services/authentication/service/src/main/java/org/collectionspace/authentication/CSpaceDBLoginModule.java
services/authentication/service/src/main/java/org/collectionspace/authentication/CSpacePrincipal.java [new file with mode: 0644]
services/authentication/service/src/main/resources/config/jboss-login-config.xml
services/authentication/service/src/main/resources/db/mysql/authentication.sql [deleted file]
services/authentication/service/src/main/resources/db/mysql/test_authn.sql [deleted file]
services/collectionobject/service/src/main/java/org/collectionspace/services/collectionobject/CollectionObjectResource.java
services/common/pom.xml
services/common/src/main/java/org/collectionspace/services/common/ServiceException.java [new file with mode: 0644]
services/common/src/main/java/org/collectionspace/services/common/context/AbstractServiceContext.java
services/common/src/main/java/org/collectionspace/services/common/context/MultipartServiceContextImpl.java
services/common/src/main/java/org/collectionspace/services/common/context/RemoteServiceContextImpl.java
services/common/src/main/java/org/collectionspace/services/common/document/BadRequestException.java
services/common/src/main/java/org/collectionspace/services/common/document/DocumentException.java
services/common/src/main/java/org/collectionspace/services/common/document/DocumentNotFoundException.java
services/common/src/main/java/org/collectionspace/services/common/security/ServiceForbiddenException.java [new file with mode: 0644]
services/common/src/main/java/org/collectionspace/services/common/security/UnauthorizedException.java [new file with mode: 0644]
services/intake/service/src/main/java/org/collectionspace/services/intake/IntakeResource.java
services/pom.xml
services/relation/service/src/main/java/org/collectionspace/services/relation/NewRelationResource.java
services/vocabulary/service/src/main/java/org/collectionspace/services/vocabulary/VocabularyResource.java