Interface MPRealmRuntimeConfig


@ConfigMapping(prefix="quarkus.security.users.embedded") @ConfigRoot(phase=RUN_TIME) public interface MPRealmRuntimeConfig
Configuration information used to populate a SimpleMapBackedSecurityRealm }
  • Method Summary

    Modifier and Type
    Method
    Description
    The algorithm with which user password is hashed.
    boolean
    If the passwords are stored in the property file as plain text, e.g.
    Map<@WithConverter(io.quarkus.runtime.configuration.TrimmedStringConverter.class) String,@WithConverter(io.quarkus.runtime.configuration.TrimmedStringConverter.class) String>
    The realm roles user1=role1,role2,...
    Map<@WithConverter(io.quarkus.runtime.configuration.TrimmedStringConverter.class) String,@WithConverter(io.quarkus.runtime.configuration.TrimmedStringConverter.class) String>
    The realm users user1=password\nuser2=password2... mapping.
  • Method Details

    • plainText

      @WithDefault("false") boolean plainText()
      If the passwords are stored in the property file as plain text, e.g. quarkus.security.users.embedded.users.alice=AlicesSecretPassword. If this is false (the default) then it is expected that passwords are hashed as per the algorithm config property.
    • algorithm

      @WithDefault("digest-sha-512") DigestAlgorithm algorithm()
      The algorithm with which user password is hashed. The library expects a password prepended with the username and the realm, in the form ALG( username ":" realm ":" password ) in hexadecimal format.

      For example, on a Unix-like system we can produce the expected hash for Alice logging in to the Quarkus realm with password AlicesSecretPassword using echo -n "alice:Quarkus:AlicesSecretPassword" | sha512sum, and thus set quarkus.security.users.embedded.users.alice=c8131...4546 (full hash output abbreviated here). This property is ignored if plainText is true.

    • users

      @ConfigDocDefault("none") Map<@WithConverter(io.quarkus.runtime.configuration.TrimmedStringConverter.class) String,@WithConverter(io.quarkus.runtime.configuration.TrimmedStringConverter.class) String> users()
      The realm users user1=password\nuser2=password2... mapping. See Embedded Users.
    • roles

      @ConfigDocDefault("none") Map<@WithConverter(io.quarkus.runtime.configuration.TrimmedStringConverter.class) String,@WithConverter(io.quarkus.runtime.configuration.TrimmedStringConverter.class) String> roles()
      The realm roles user1=role1,role2,...\nuser2=role1,role2,... mapping See Embedded Roles.