2.3. プロパティーレルム
プロパティーレルムはプロパティーファイルを使用して、ユーザーおよびグループを定義します。
-
users.propertiesには Data Grid ユーザーの認証情報が含まれます。パスワードは、DIGEST-MD5およびDIGEST認証メカニズムを使用して事前署名できます。 -
groups.propertiesは、ユーザーをロールおよびパーミッションに関連付けます。
注記
プロパティーファイルには、Data Grid Server 設定のセキュリティーレルムに関連付けるヘッダーが含まれます。
users.properties
myuser=a_password
user2=another_password
groups.properties
myuser=supervisor,reader,writer
user2=supervisor
プロパティーレルム設定
XML
<server xmlns="urn:infinispan:server:13.0">
<security>
<security-realms>
<security-realm name="default">
<!-- groups-attribute configures the "groups.properties" file to contain security authorization roles. -->
<properties-realm groups-attribute="Roles">
<user-properties path="users.properties"
relative-to="infinispan.server.config.path"
plain-text="true"/>
<group-properties path="groups.properties"
relative-to="infinispan.server.config.path"/>
</properties-realm>
</security-realm>
</security-realms>
</security>
</server>
JSON
{
"server": {
"security": {
"security-realms": [{
"name": "default",
"properties-realm": {
"groups-attribute": "Roles",
"user-properties": {
"digest-realm-name": "default",
"path": "users.properties",
"relative-to": "infinispan.server.config.path",
"plain-text": true
},
"group-properties": {
"path": "groups.properties",
"relative-to": "infinispan.server.config.path"
}
}
}]
}
}
}
YAML
server:
security:
securityRealms:
- name: "default"
propertiesRealm:
# groupsAttribute configures the "groups.properties" file
# to contain security authorization roles.
groupsAttribute: "Roles"
userProperties:
digestRealmName: "default"
path: "users.properties"
relative-to: 'infinispan.server.config.path'
plainText: "true"
groupProperties:
path: "groups.properties"
relative-to: 'infinispan.server.config.path'