Use a common database user id, and manage auditing and security in the application
Group items matching
in title, tags, annotations or url
9More
Java Persistence/Auditing and Security - Wikibooks, open books for an open world - 0 views
-
adding a AUDIT_USER and AUDIT_TIMESTAMP column to all of the audited tables and auditUser and auditTimestamp field to all of the audited objects
- ...5 more annotations...
-
When the application inserts or updates an object, it will set these fields and they will be stored in the database. JPA events could also be used to record the audit information, or to write to a separate audit table.
-
@Column("AUDIT_USER"); protected String auditUser; @Column("AUDIT_TIMESTAMP"); protected Calendar auditTimestamp;
-
@PrePersist @PreUpdate public void updateAuditInfo() { setAuditUser((String)AuditedObject.currentUser.get()); setAuditTimestamp(Calendar.getInstance()); }
12More
This is Stuff: Apache Shiro Part 2 - Realms, Database and PGP Certificates - 0 views
- ...9 more annotations...
-
account credentials and access rights are stored in database. Stored passwords are hashed and salted.
-
If the realm wishes to do also authorization, it has to implement Authorizer interface. Each Authorizer method takes principal as parameter and checks either role(s) or permission(s)
30More
shared by kuni katsuya on 27 Mar 13
- No Cached
Access Tokens and Types - Facebook Developers - 0 views
developers.facebook.com/...access-tokens-and-types
Facebook login authentication AccessToken FacebookAPI

- ...27 more annotations...
-
App Secret or an App Access token should never be included in any code that could be accessed by anyone other than a developer of the app
-
App Access Tokens should only be used directly from your app's servers in order to provide the best security
4More
JQL Searching on the new Sprint field instead of fixVersion - JIRA Knowledge Base - Atl... - 0 views
-
sprint number is the sprintID at the end of the string
-
eg. http://jira.vfmltech.com/secure/GHGoToBoard.jspa?sprintId=4 jql query: Sprint=4
-
6More
Adobe Community: Updated Groovy template for GraniteDS Builder (gas3) - 0 views
-
also stripped out the specialized GraniteDS datatypes in favor of the LCDS serialization convention that Adobe uses (i.e. a Java map should translate to an 'Object' type, a Java enum should translate to a 'String', and Java collections should always serialize as 'ArrayCollection')
-
didn't do a 'base' version and a version that doesnt get touched by the code generator, but you could easily do so by modifying this template
- ...3 more annotations...
25More
Entity-attribute-value model - Wikipedia, the free encyclopedia - 0 views
-
Entity–attribute–value model (EAV) is a data model to describe entities where the number of attributes (properties, parameters) that can be used to describe them is potentially vast, but the number that will actually apply to a given entity is relatively modest
- ...21 more annotations...
-
In an EAV data model, each attribute-value pair is a fact describing an entity, and a row in an EAV table stores a single fact
-
EAV tables are often described as "long and skinny": "long" refers to the number of rows, "skinny" to the few columns
-
Data is recorded as three columns: The entity: the item being described. The attribute or parameter: a foreign key into a table of attribute definitions. At the very least, the attribute definitions table would contain the following columns: an attribute ID, attribute name, description, data type, and columns assisting input validation
-
Row modeling, where facts about something (in this case, a sales transaction) are recorded as multiple rows rather than multiple columns
-
differences between row modeling and EAV (which may be considered a generalization of row-modeling) are:
-
The data type of the value column/s in a row-modeled table is pre-determined by the nature of the facts it records. By contrast, in an EAV table, the conceptual data type of a value in a particular row depend on the attribute in that row
-
In the EAV table itself, this is just an attribute ID, a foreign key into an Attribute Definitions table
-
larger systems use separate EAV tables for each data type (including binary large objects, "BLOBS"), with the metadata for a given attribute identifying the EAV table in which its data will be stored
-
Where an EAV system is implemented through RDF, the RDF Schema language may conveniently be used to express such metadata
-
access to metadata must be restricted, and an audit trail of accesses and changes put into place to deal with situations where multiple individuals have metadata access
-
quality of the annotation and documentation within the metadata (i.e., the narrative/explanatory text in the descriptive columns of the metadata sub-schema) must be much higher, in order to facilitate understanding by various members of the development team.
-
Validation metadata include data type, range of permissible values or membership in a set of values, regular expression match, default value, and whether the value is permitted to be null
-
Grouping metadata: Attributes are typically presented as part of a higher-order group, e.g., a specialty-specific form. Grouping metadata includes information such as the order in which attributes are presented
1More
DomainPermission (Apache Shiro 1.2.1 API) - 0 views
5More
shared by kuni katsuya on 29 Aug 12
- No Cached
Grails - user - Can Spring Security OR Shiro Enable Fine Grained Hierarchical Permissions? - 0 views
grails.1312388.n4.nabble.com/cal-Permissions-td3239652.html
ApacheShiro security permission inheritance

-
Another option would be to create your own Permission instances and implement the isPermitted() method such that it delegates to Location.isIn(Location) for permission checks
- ...2 more annotations...
4More
shared by kuni katsuya on 03 Sep 12
- No Cached
RolePermissionResolver (Apache Shiro :: Core 1.1.0 API) - 0 views
127.0.0.1/...RolePermissionResolver.html
security ApacheShiro Role Permission RolePermissionResolver

24More
Dependency Injection in Java EE 6 - Part 1 - 0 views
-
high-level look at CDI, see how it fits with Java EE overall and discuss basic dependency management as well as scoping.
- ...21 more annotations...
-
CDI allows you to manage the scope, state, life-cycle and context for objects in a much more declarative fashion, rather than the programmatic way
-
well-defined create/destroy life-cycle that you can get callbacks for via the @PostConstruct and @PreDestroy annotations.
-
CDI does not directly support business component services such as transactions, security, remoting, messaging
-
JSR 330 defines a minimalistic API for dependency injection solutions and is primarily geared towards non-Java EE environments.
-
none of this uses string names that can be mistyped and all the code is in Java and so is checked at compile time
-
are additional pieces of meta-data that narrow down a particular class when more than one candidate for injection exists
11More
Equals and HashCode | Hibernate | JBoss Community - 0 views
-
The general contract is: if you want to store an object in a List, Map or a Set then it is an requirement that equals and hashCode are implemented so they obey the standard contract as specified in the documentation
-
Why are equals() and hashcode() importantNormally, most Java objects provide a built-in equals() and hashCode() based on the object's identity; so each new() object will be different from all others.
- ...8 more annotations...
-
recommend using the "semi"-unique attributes of your persistent class to implement equals() (and hashCode()
-
The database identifier property should only be an object identifier, and basically should be used by Hibernate only
-
Instead of using the database identifier for the equality comparison, you should use a set of properties for equals() that identify your individual objects
4More
Apache Shiro JDBC Realm « Mehmet Celiksoy's Weblog - 0 views
41More
Security Module Drafts - Apache DeltaSpike - Apache Software Foundation - 0 views
-
Impersonalization
-
authenticates “as a user” or access application imitating his identity - without knowing his password
- ...36 more annotations...
-
assign permissions to individual objects within the application’s business domain
-
Events LoggedInEvent LoginFailedEvent AlreadyLoggedInEvent PreLoggedOutEvent PostLoggedOutEvent PreAuthenticateEvent PostAuthenticateEvent
-
control which elements of the user interface are displayed to the user based on their assigned permissions
5More
shared by kuni katsuya on 06 Jun 12
- No Cached
GraniteDS - deserialize ActionScript object to a Java Map object - Ross Henderson - 0 views
blog.rosshenderson.info/...pt-object-to-a-java-map-object
graniteds deserialization serialization actionscript

- ...2 more annotations...
-
Granite claims to implement the same serialization/deserialization matrix as BlazeDS (with two small exceptions).
19More
8. Bean Validation (JSR-303) - Confluence - 0 views
-
"Bean Validation" specification (aka JSR-303) standardizes an annotation-based validation framework for Java
-
Flex doesn't provide by itself such framework. The standard way of processing validation is to use Validator subclasses and to bind each validator to each user input (see Validating data). This method is at least time consuming for the developer, source of inconsistancies between the client-side and the server-side validation processes, and source of redundancies in your MXML code.
-
GraniteDS introduces an ActionsScript3 implementation of the Bean Validation specification and provides code generation tools integration so that your Java constraint annotations are reproduced in your AS3 beans
- ...16 more annotations...
-
Constraint Description AssertFalse The annotated element must be false AssertTrue The annotated element must be true DecimalMax The annotated element must be a number whose value must be lower or equal to the specified maximum DecimalMin The annotated element must be a number whose value must be greater or equal to the specified minimum Digits The annotated element must be a number whithin accepted range Future The annotated element must be a date in the future Max The annotated element must be a number whose value must be lower or equal to the specified maximum Min The annotated element must be a number whose value must be greater or equal to the specified minimum NotNull The annotated element must not be null Null The annotated element must be null Past The annotated element must be a date in the past Pattern The annotated String must match the supplied regular expression Size The annotated element size must be between the specified boundaries (included)
-
Constraint annotations must be placed on public properties, either public variables or public accessors
-
-keep-as3-metadata+=AssertFalse,AssertTrue,DecimalMax,DecimalMin, Digits,Future,Max,Min,NotNull,Null,Past,Pattern,Size
8More
MySQL :: MySQL 3.23, 4.0, 4.1 Reference Manual :: 17.3.4.1 Driver/Datasource Class Name... - 0 views
-
useUnicode
-
-
see also: http://www.diigo.com/ditem_mana2/read_ditem?link_id=124285330&url=http%3A%2F%2Fdev.mysql.com%2Fdoc%2Frefman%2F4.1%2Fen%2Fconnector-j-reference-charsets.html if characterEncoding is unspecified, jdbc driver sets it to the character set specified by the mysql system
-
- ...2 more annotations...
-
If 'useUnicode' is set to true, what character encoding should the driver use when dealing with strings? (defaults is to 'autodetect')
-
48More
Logging Cheat Sheet - OWASP - 0 views
-
Legal and other opt-ins
-
Data changes
- ...35 more annotations...
-
Application identifier
-
Application address
-
User identity
-
Description
-
Action
-
Object
-
Result status
-
Reason
74More
Chapter 15. Data Management - 1 views
-
abstractEntity.uid();
- ...70 more annotations...
-
id is defined and is maintained in the three layers during the different serialization/persistence operations
-
recommended approach to avoid any kind of subtle problems is to have a real uid property which will be persisted in the database but is not a primary key for efficiency concerns
-
Calling the EntityGraphUninitializer manually is a bit tedious and ugly, so there is a cleaner possibility when you are using generated typesafe service proxies
-
in the Flex application, register the UninitializeArgumentPreprocessor component in Tide as follows :
-
Tide maintains a client-side cache of entity instances and ensures that every instance is unique in the Flex client context
-
Tide currently only supports Integer or Long version fields, not timestamps and that the field must be nullable
-
@Column(name="ENTITY_UID", unique=true, nullable=false, updatable=false, length=36) private String uid;
-
correct way of knowing if any object has been changed in the context, is to use the property meta_dirty of the Tide context
‹ Previous
21 - 40 of 40