Skip to content
This repository has been archived by the owner on Nov 9, 2017. It is now read-only.

Commit

Permalink
Added extra realm, for dev purposes.
Browse files Browse the repository at this point in the history
  • Loading branch information
jpkrohling committed Mar 12, 2015
1 parent e4c25d4 commit d814b8c
Show file tree
Hide file tree
Showing 3 changed files with 107 additions and 1 deletion.
3 changes: 3 additions & 0 deletions kettle/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
<properties>
<kettle.build.type>production</kettle.build.type>
<nest.dist.zip.root.dir>wildfly-${version.org.wildfly}</nest.dist.zip.root.dir>
<hawkular.realm.template>hawkular-realm.json</hawkular.realm.template>

<checkstyle.suppressions.file>${basedir}/src/main/scripts/checkstyle-suppressions.xml</checkstyle.suppressions.file>

Expand Down Expand Up @@ -267,6 +268,8 @@
<id>dev</id>
<properties>
<kettle.build.type>dev</kettle.build.type>
<!-- This special realm for dev purposes has a default user 'jdoe' with password 'password' -->
<hawkular.realm.template>hawkular-realm-for-dev.json</hawkular.realm.template>
</properties>
<build>
<plugins>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,98 @@
{
"id" : "hawkular-realm",
"realm" : "hawkular",
"enabled" : true,
"sslRequired" : "none",
"passwordCredentialGrantAllowed" : true,
"registrationAllowed" : true,
"requiredCredentials" : [ "password" ],
"passwordPolicy" : "length(8) and lowerCase(1) and upperCase(1) and specialChars(1) and digits(1) and hashIterations(1)",
"defaultRoles" : [ "user" ],
"users" : [ {
"id" : "28026b36-8fe4-4332-84c8-524e173a68bf",
"username" : "jdoe",
"enabled" : true,
"totp" : false,
"emailVerified" : false,
"firstName" : "John",
"lastName" : "Doe",
"email" : "jdoe@acme.com",
"credentials" : [ {
"type" : "password",
"hashedSaltedValue" : "ltSl89y75f8LTzoT646xO9NPTrm114ubTauplgw+TQ62ZDy8K89+y7jFzp/jnSvEh9TENQ4RRvNA6vdGOUDcXg==",
"salt" : "m8PY6Q9lICl9BHSS03D2Ug==",
"hashIterations" : 1,
"temporary" : false
} ],
"requiredActions" : [ ],
"realmRoles" : [ "user" ],
"applicationRoles" : {
"account" : [ "view-profile", "manage-account" ]
}
} ],
"roles" : {
"realm" : [
{
"name": "user",
"description": "User privileges",
"composite": true,
"composites": {
"application": {
"hawkular-accounts-backend": ["user"]
}
}
},
{
"name": "admin",
"description": "Admin privileges",
"composite": true,
"composites": {
"application": {
"hawkular-accounts-backend": ["admin"]
},
"realm": ["user"]
}
}
],
"application": {
"hawkular-accounts-backend": [
{
"name": "user"
},
{
"name": "admin"
}
]
}
},
"scopeMappings": [
{
"client": "hawkular-ui",
"roles": ["user"]
}
],
"applications" : [
{
"name": "hawkular-accounts-backend",
"enabled": true,
"bearerOnly" : true,
"publicClient": false,
"secret" : "${uuid.hawkular.accounts.backend}"
},
{
"name": "hawkular-ui",
"enabled": true,
"bearerOnly" : false,
"publicClient": true,
"secret": "${uuid.hawkular.ui}",
"fullScopeAllowed" : false,
"redirectUris": ["/*"],
"webOrigins": [],
"claims": {
"username": true,
"name": true,
"email": true
}
}
]
}
7 changes: 6 additions & 1 deletion kettle/src/main/scripts/distro-assembly.xml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,10 @@
<fileSet>
<directory>src/main/resources</directory>
<outputDirectory>/${nest.dist.zip.root.dir}/</outputDirectory>
<excludes>
<!-- We handle this file specially (at the end of this file) -->
<exclude>**/hawkular-realm*json</exclude>
</excludes>
</fileSet>
</fileSets>

Expand Down Expand Up @@ -111,9 +115,10 @@

<files>
<file>
<source>src/main/resources/standalone/configuration/hawkular-realm.json</source>
<source>src/main/resources/standalone/configuration/${hawkular.realm.template}</source>
<outputDirectory>${nest.dist.zip.root.dir}/standalone/configuration/</outputDirectory>
<filtered>true</filtered>
<destName>hawkular-realm.json</destName>
</file>
</files>

Expand Down

0 comments on commit d814b8c

Please sign in to comment.