#
# * Copyright 2018 Red Hat, Inc. and/or its affiliates
# * and other contributors as indicated by the @author tags.
# *
# * Licensed under the Apache License, Version 2.0 (the "License");
# * you may not use this file except in compliance with the License.
# * You may obtain a copy of the License at
# *
# * http://www.apache.org/licenses/LICENSE-2.0
# *
# * Unless required by applicable law or agreed to in writing, software
# * distributed under the License is distributed on an "AS IS" BASIS,
# * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# * See the License for the specific language governing permissions and
# * limitations under the License.
#
# This dataset provides a default realm configuration using role-based policies which can be extended to create more test scenarios:
#
# - 1 realm
# - 1 client
# - 1 user
# - 1k resources
# - Each resource with 10 scopes
# - Each resource associated with a single resource permission
# - 500 Scopes
# - 100 role policies
# - 1000 resource permissions
# - Each resource permissions associated with 10 role policies
# REALM
realms=1
realm.realm=authz-perf-tests
realm.displayName=AuthZ Performance Tests
realm.enabled=true
realm.registrationAllowed=true
realm.accessTokenLifeSpan=60
realm.passwordPolicy=hashIterations(1000)
# REALM ROLE
realmRolesPerRealm=100
realmRole.name=role_${index?string("00")}
realmRole.description=Role ${index} of ${realm.displayName}
# CLIENT
clientsPerRealm=1
client.clientId=client_${index?string("00")}
client.name=Client ${index} of ${realm.displayName}
client.description=Description of ${name}
client.rootUrl=
client.adminUrl=
client.baseUrl=http://clients.${realm.realm}.test/client_${index}
client.enabled=true
client.secret=secret
# TODO support for multiple redirect uris
#client.redirectUris=${baseUrl}/* http://load-balancing-domain.test/${clientId}/*
client.redirectUris=${baseUrl}/*
client.webOrigins=
client.protocol=openid-connect
client.publicClient=false
client.bearerOnly=false
client.authorizationServicesEnabled=true
client.serviceAccountsEnabled=true
# CLIENT ROLE
clientRolesPerClient=1
clientRole.name=clientrole_${index?string("00")}
clientRole.description=Role ${index} of ${client.name}
# USER
usersPerRealm=1
user.username=user_${index?string("00")}
user.enabled=true
user.email=${username}@email.test
user.emailVerified=true
user.firstName=User_${index}
user.lastName=O'Realm_${realm.index}
credential.type=password
credential.value=password
credential.temporary=false
# USER ATTRIBUTE
attributesPerUser=50
userAttribute.name=attribute_${index?string("00")}
userAttribute.value=<#list 0..2 as i>value_${i}_of_${name}<#sep>,</#sep></#list>
# USER ROLE MAPPINGS
realmRolesPerUser=50
clientRolesPerUser=0
# GROUP
groupsPerRealm=100
group.name=group_${index?string("00")}
# GROUP ATTRIBUTE
attributesPerGroup=50
groupAttribute.name=attribute_${index?string("00")}
groupAttribute.value=<#list 0..2 as i>value_${i}_of_${name}<#sep>,</#sep></#list>
### AUTHZ
# RESOURCE SERVER
resourceServer.allowRemoteResourceManagement=true
resourceServer.policyEnforcementMode=ENFORCING
# SCOPE
scopesPerResourceServer=10
scope.name=scope_${index}
scope.displayName=Scope ${index} of ${resourceServer.clientId}
# RESOURCE
resourcesPerResourceServer=1000
resource.name=resource_${index}
resource.displayName=Resource ${index}
resource.uri=${resourceServer.client.baseUrl}/resource_${index}
resource.type=<#if index == 0>urn:${resourceServer.clientId}:resources:default</#if>
resource.ownerManagedAccess=false
# RESOURCE MAPPINGS
scopesPerResource=10
# ROLE POLICY
rolePoliciesPerResourceServer=100
rolePolicy.name=role_policy_${index}
rolePolicy.description=Role Policy ${index} of ${resourceServer.name}
rolePolicy.logic=POSITIVE
# ROLE POLICY ROLE DEFINITION
rolePolicyRoleDefinition.required=false
realmRolesPerRolePolicy=10
clientRolesPerRolePolicy=0
# JS POLICY
jsPoliciesPerResourceServer=0
jsPolicy.name=js_policy_${index}
jsPolicy.description=JavaScript Policy ${index} of ${resourceServer.name}
jsPolicy.code=// TODO add some JavaScript code\n// for JavaScript Policy ${index}\n// more\n// lines ...
jsPolicy.logic=POSITIVE
# USER POLICY
userPoliciesPerResourceServer=0
userPolicy.name=user_policy_${index}
userPolicy.description=User Policy ${index} of ${resourceServer.name}
userPolicy.logic=POSITIVE
# USER POLICY MAPPINGS
usersPerUserPolicy=0
# CLIENT POLICY
clientPoliciesPerResourceServer=0
clientPolicy.name=client_policy_${index}
clientPolicy.description=Client Policy ${index} of ${resourceServer.name}
clientPolicy.logic=POSITIVE
# CLIENT POLICY MAPPINGS
clientsPerClientPolicy=0
# RESOURCE PERMISSION
resourcePermissionsPerResourceServer=1000
resourcePermission.name=resource_permission_${index}
resourcePermission.description=Resource Permisison ${index} of ${resourceServer.name}
resourcePermission.resourceType=<#if index == 0>urn:${resourceServer.clientId}:resources:default</#if>
resourcePermission.decisionStrategy=UNANIMOUS
# RESOURCE PERMISSION MAPPINGS
resourcesPerResourcePermission=1
policiesPerResourcePermission=10
# SCOPE PERMISSION
scopePermissionsPerResourceServer=0
scopePermission.name=scope_permission_${index}
scopePermission.description=Scope Permisison ${index} of ${resourceServer.name}
scopePermission.decisionStrategy=UNANIMOUS
# SCOPE PERMISSION MAPPINGS
scopesPerScopePermission=10
policiesPerScopePermission=5