Commit Graph

107 Commits

Author SHA1 Message Date
Robert von Burg 3d8fa992d4 [Project] moved some project details to parent ch.eitchnet.parent
This simplifies project setup and maintenance
2013-09-21 09:03:05 +02:00
Robert von Burg 31c6acec6c [Minor] fixed failing test due to different formatting of xml writing 2013-09-15 21:57:42 +02:00
Robert von Burg 874acc5828 fixed wrong namespace in PrivilegeModel.xsd 2013-08-12 17:00:05 +02:00
Robert von Burg c4e6c5e65d Refactored InitializationHelper so it can take an InputStream
Also renamed it to PrivilegeInitializationHelper
2013-08-12 11:04:42 +02:00
Robert von Burg d7f10a731f [Minor] fixed compiler warnings
fixed multiple compiler warnings about broken JavaDocs and pom which was
still set to Java 1.6, now changed to 1.7
2013-08-08 00:32:39 +02:00
Robert von Burg 6eb34ff532 [Minor] fixed problem with build on mvn cli
The problem was due to a naming problem with the PrivilegeMessages class
and property bundle having the same name and being in the same package.
Moved the properties file now to the resources directory
2013-04-19 21:33:18 +02:00
Robert von Burg 93022ba559 [Major] major rewrite of the privilege validation.
Now the PrivilegeContext object is central and once the user logged in,
this object is bound to a ThreadLocal. From then there is no further
need to interact with the PrivilegeHandler - this allows for
authenticated users to get a remote copy of the PrivilegeContext so that
on a remote client, the user can check for permissions, without having
to do the round trip to the server.

A code review of this change would be good, but preliminary tests show
that it works. A test should now be implemented to check if getting a
remote copy also allows for authorization.
2013-04-09 07:33:32 +02:00
Robert von Burg 9261494667 [Minor] cleaned up doc and implemented missing toString() and equals()
A number classes had JavaDocs with @see parameters on overriding
methods. This was changed so that they were removed, as they are not
needed.

In some classes the toString() methods were missing, as well as equals()
and hashcode() they were now added
2013-03-26 19:42:17 +01:00
Robert von Burg 44cb148036 [Minor] code cleanup
- cleaned up JavaDoc for some classes
- changed equals() to not use instanceOf but class==class
- set some fields private which were package scope
2013-03-24 12:23:29 +01:00
Robert von Burg 17525a41d5 [Bugfix] fixed failing test due to uppercase/lowercase change of BASE16 2013-03-17 12:08:12 +01:00
Robert von Burg bf250de0f9 Merge branch 'master' of ssh://github.com/eitch/ch.eitchnet.privilege 2013-02-24 11:27:34 +01:00
Robert von Burg acef67a99f [Minor] code cleanup
commented out unneeded code
2013-01-31 19:07:37 +01:00
Robert von Burg 08c70f5ec0 Update pom.xml
Added distribution management to deploy to nexus.eitchnet.ch
2013-01-30 15:02:17 +01:00
Robert von Burg f92afab671 Removed local XmlHelper and moved it to ch.eitchnet.utils 2013-01-20 23:21:56 +01:00
Robert von Burg dfbae9b6cb moved XML schemas to src/main/resoures/ 2013-01-20 22:53:58 +01:00
Robert von Burg e2ebcd1fc6 Fixed some unnecessary TODOs 2013-01-20 22:50:03 +01:00
Robert von Burg f67fbe4edb fixed XXX in copyright headers 2013-01-20 22:44:25 +01:00
Robert von Burg b5b9465dbe fixed compilation warning 2013-01-20 22:35:59 +01:00
Robert von Burg 7814b844a1 fixed an NPE when a user has no parameters during SAX parsing 2013-01-20 22:34:46 +01:00
Robert von Burg 663a0b5995 Merge branch 'switchToJdkSax' 2013-01-20 22:28:57 +01:00
Robert von Burg 5a9104ebbb Fixed failing tests due to a problem in Java 7 changing the byte code
compilation sequence, thus the tests must have better sequencing
2013-01-20 22:21:14 +01:00
Robert von Burg e76d9f9121 Implemented XML parsing and writing by using basic Java implementation 2013-01-20 21:26:18 +01:00
Robert von Burg 9970055cf9 [New] added preliminary XML schemas for XML files 2012-12-04 20:30:04 +01:00
Robert von Burg 717e2de556 [Minor] cleaned up test
tests left some state files, which are now cleaned up as well
2012-12-01 00:12:00 +01:00
Robert von Burg e0f0b67f60 [Bugfix] fixed failing tests
The tests did not work because of some previous refactoring or some
other weirdness. Solved this issue now by initializing better the
persistence handler for testing
2012-12-01 00:08:09 +01:00
Robert von Burg 28a60b52f7 [New] implemented auto persist on password change
Through configuration option it is now possible to enable automatic
persisting after password change, no matter who the user is.
2012-12-01 00:06:54 +01:00
Robert von Burg f73d829822 [Minor] moved exceptions to base package
Exceptions were previously in package i18n, this didn't make sense, so
they were move to base
2012-12-01 00:04:45 +01:00
Robert von Burg eac0782810 [Minor] Removed dependency to ch.eitchnet.log4j and thus added log4j.xml
The log4j.xml configuration file is in the test resources and now the
project is completely free of a dependency to a concrete logging
implementation as all logging of the sources is done over slf4j
2012-11-25 00:44:56 +01:00
Robert von Burg 2b0e23eb28 [Major] refactored use of log4j to slf4j 2012-11-24 13:23:49 +01:00
Robert von Burg 59e25a8e75 [Minor] code cleanup 2012-11-19 22:50:32 +01:00
Robert von Burg 8b780368d7 [Devel] implementing PrivilegeHandler.runAsSystem()
Implementing the runAsSystem() so that special actions can be performed,
where no user is logged in

Refactored the test classes so that model specific classes are in the
model sub package.
2012-08-05 01:33:54 +02:00
Robert von Burg 3831d29a12 [Minor] updated dependency to ch.eitchnet.utils to 0.1.0 2012-08-04 21:36:49 +02:00
Robert von Burg 45e5eac46d [Minor] change modifier of DefaultPrivilegeHandler.nextSessionId()
set method DefaultPrivilegeHandler.nextSessionId() to protected from
private so it can be used in sub classes
2012-08-04 21:31:56 +02:00
Robert von Burg b78e9bb064 [New] added a new PrivilegeHandler.queryUser(UserRep) to query users
- The querying is done by passing a UserRep with all the fields set
which
need to be equal to select the user. Null fields are understood as not
required

- Performed further clean up in that all password variables have been
changed to type byte[].

- Cleaned up copyright notices in files

- fixed version of Privilege 0.1.0-SNAPSHOT in pom.xml
2012-07-29 18:23:31 +02:00
Robert von Burg f471be1ea7 [Minor] change mvn eclipse configuration to load sources as well 2012-07-28 23:17:45 +02:00
Robert von Burg 7e6987b358 [Minor] Added eclipse settings to .gitignore 2012-07-28 15:47:26 +02:00
Robert von Burg 0e026bf713 [Major] rebuilt project to use Maven.
- Now a "mvn compile" will build the project
- Note, that since ch.eitchnet.utils is a dependency, it must be installed first using "mvn install" to be able to compile Privilege
2012-07-28 15:40:01 +02:00
Robert von Burg c44b30a1e1 [Internal] bumped the MANIFEST.MF version to 0.0.3 2011-11-11 10:58:19 +01:00
Robert von Burg 81cb2aa8ae [Interface] added a property map to the Certificate which is a copy of
the users properties on login. This map can be used to configure the
user's session
2011-11-11 10:56:56 +01:00
Robert von Burg 3c322c5b88 [Internal] minor project building changes 2011-11-09 15:05:36 +01:00
Robert von Burg db3c086d39 [Minor] minor message change where if <AllAllowed> is false, the policy,
deny and allow must be defined. This is now better communicated in the
exception message
2011-11-09 15:05:05 +01:00
Robert von Burg cb6215b235 [Bugfix] fixed a bug where if the <AllAllowed> tag was not defined in
the PrivilegeModel.xml file then a NullPointer was thrown. It is now
possible to leave out this tag, in which case false is assumed
2011-11-09 15:03:50 +01:00
Robert von Burg 058e67f10e [New] it is now possible for a user to change their own password 2011-08-07 16:13:23 +02:00
Robert von Burg bb515756cb [New] Changed Privilege Users to have a map of properties with which
meta data of a user can be stored. This can be used for validationg
privileges on user specific data
2011-08-07 16:00:38 +02:00
Robert von Burg 8967f78113 [Minor] Added the build directory dist to the ignore list 2011-08-07 13:52:09 +02:00
Robert von Burg c594d373d4 [New] added the README file with a general overview, it is not finished, but has the basics 2011-08-07 13:48:56 +02:00
eitch bef87b1a18 [Minor] code comments cleanup, added LGPL reference and copyright notice 2011-08-07 10:14:40 +00:00
eitch 4c455c130a 2011-07-31 15:18:29 +00:00
eitch e8a7fb5cf9 [Interface] changed all methods which return boolean on action allowed to be void as they must throw exceptions if the privilege is not granted 2011-07-30 17:34:53 +00:00
eitch 6191949c3e [Minor] logging of authentication attempts 2011-07-30 14:10:47 +00:00