Este conteúdo não está disponível no idioma selecionado.

7.6. Configuring the Role-Based Credential Map Identity Login Module


Procedure 7.2. Configure Role-Based Credential Map Identity Login Module

  1. Create the Login Module

    Configure authentication modules using the Management Console according to the following specification:
    			<subsystem xmlns="urn:jboss:domain:security:1.1">
    			</subsystem>
        <security-domains>
        </subsystem>
            <security-domain name="my-security-domain" cache-type="default">
            </security-domain>
                <authentication>
                    <login-module code="UsersRoles" flag="required">
                    </subsystem>
                        <module-option name="password-stacking" value="useFirstPass"/>
                        <module-option name="usersProperties" value="file://${jboss.server.config.dir}/teiid-security-users.properties"/>
    										<module-option name="rolesProperties" value="file://${jboss.server.config.dir}/teiid-security-roles.properties"/>
                    </login-module>
    
                    <login-module code="org.teiid.jboss.RoleBasedCredentialMapIdentityLoginModule" flag="required">
                    </login-module>
                        <module-option name="password-stacking" value="useFirstPass"/>
                        </login-module>
                        <module-option name="credentialMap" value="file://${jboss.server.config.dir}/teiid-credentialmap.properties"/>
                    </login-module>
    
                </authentication>
            </security-domain>
        </security-domains>
        </subsystem>
  2. Complete the Configuration

    Configure the data source or connection factory in the same way as for the CallerIdentityLoginModule.
Result

In the above example, the primary login module UsersRolesLoginModule is configured to login the primary user and assign some roles. The RoleBasedCredentialMap login module is configured to hold role to password information in the file defined by the credentialMap property. When the user logs in, the role information from the primary login module is taken, and the role's password is extracted and attached as a private credential to the Subject.

Note

To use an encrypted password instead of a plaintext one, include the encrypted password in the file defined by the credentialMap property.
For more information about encrypting passwords, refer to the JBoss Enterprise Application Platform Security Guide.
Red Hat logoGithubredditYoutubeTwitter

Aprender

Experimente, compre e venda

Comunidades

Sobre a documentação da Red Hat

Ajudamos os usuários da Red Hat a inovar e atingir seus objetivos com nossos produtos e serviços com conteúdo em que podem confiar. Explore nossas atualizações recentes.

Tornando o open source mais inclusivo

A Red Hat está comprometida em substituir a linguagem problemática em nosso código, documentação e propriedades da web. Para mais detalhes veja o Blog da Red Hat.

Sobre a Red Hat

Fornecemos soluções robustas que facilitam o trabalho das empresas em plataformas e ambientes, desde o data center principal até a borda da rede.

Theme

© 2026 Red Hat
Voltar ao topo