#
# Copyright (c) 2016, 2018 Oracle and/or its affiliates. All rights reserved.
#
# 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.
#

security:
  config:
    # Configuration of secured config (encryption of passwords in property files)
    # Set to true for production - if set to true, clear text passwords will cause failure
    require-encryption: false
    aes.insecure-passphrase: "jungle"
  providers:
    # Configuration of security providers
    - http-basic-auth:
        # https://tools.ietf.org/html/rfc2617
        realm: "mic"
        users:
          - login: "jack"
            password: "${CLEAR=jackIsGreat}"
            roles: ["user", "admin"]
          - login: "jill"
            # master password is "jungle", password is "password"
            password: "${AES=3XQ8A1RszE9JbXl+lUnnsX0gakuqjnTyp8YJWIAU1D3SiM2TaSnxd6U0/LjrdJYv}"
            roles: ["user"]
    - http-digest-auth:
        realm: "mic"
        # Algorithm - MD5 is default (and now the only supported)
        # algorithm: "MD5"
        # QOP options - auth or empty (fallback to old RFC)
        # default is auth
        # qop: ["auth"]

        # Password for protecting nonce values. Should be the same for
        # services that want to share digest authentication (obviously together with realm)
        server-secret: "pwd"

        # Timeout of nonce values, defeault is 24 hours
        # nonce-timeout-millis: 11111111111
        users:
          - login: "jack"
            password: "${CLEAR=jackIsGreat}"
            roles: ["user", "admin"]
          - login: "jill"
            # master password is "jungle", password is "password"
            password: "${AES=3XQ8A1RszE9JbXl+lUnnsX0gakuqjnTyp8YJWIAU1D3SiM2TaSnxd6U0/LjrdJYv}"
            roles: ["user"]
    - name: "digest_old"
      http-digest-auth:
        realm: "mic"
        type: "DIGEST"
        # QOP options - auth or empty (fallback to old RFC)
        qop: []
        users:
          - login: "jack"
            password: "${CLEAR=jackIsGreat}"
            roles: ["user", "admin"]
          - login: "jill"
            # master password is "jungle", password is "password"
            password: "${AES=3XQ8A1RszE9JbXl+lUnnsX0gakuqjnTyp8YJWIAU1D3SiM2TaSnxd6U0/LjrdJYv}"
            roles: ["user"]
