Skip to content

Instantly share code, notes, and snippets.

@jwhb
Last active January 20, 2017 08:56
Show Gist options
  • Save jwhb/d617544cfdf766dbc2cb02bffc72c6c7 to your computer and use it in GitHub Desktop.
Save jwhb/d617544cfdf766dbc2cb02bffc72c6c7 to your computer and use it in GitHub Desktop.
Creating a JDBC Security Realm with Asadmin and Derby
# The following asadmin command creates a JDBC Security Realm. It was created with a Derby database in mind, thus all table and column names are in uppercase. For non-Derby databases you might need to respect the actual cases.
asadmin create-auth-realm --classname com.sun.enterprise.security.auth.realm.jdbc.JDBCRealm --property user-name-column=USERNAME:password-column=PASSWORD:digestrealm-password-enc-algorithm=none:group-name-column=GROUPNAME:group-table=USERS_GROUPS:user-table=USERS:datasource-jndi=jdbc/myapp-ds:jaas-context=jdbcRealm:db-user=admin:db-password=admin:digest-algorithm=none:group-table-user-name-column=USERNAME jdbcRealm
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment