#
# Copyright (c) 2017, 2019 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:
  # Set to true for production - if set to true, clear text passwords will cause failure
  require-encryption: false
  # This should be configured by system property or environment variable for production - the "master" passwords for AES decryption
  aes.insecure-passphrase: "myMasterPasswordForEncryption"
  # See documentation of pki-util
  rsa:
    # load from classpath
    keystore-resource-path: ".ssh/keystore.p12"
    # If keystore is used, alias to use from the keystore (in my example, it is "1")
    key-alias: "1"
    # Password of keystore
    keystore-passphrase: "j4c"

# Secret in clear text - for non-prod environments, this is enough. Intentionally wrapped as password to protect for prod.
pwd1: "${CLEAR=known_password}"
# A reference to another property (and maybe in the future to a key in a "wallet" service)
pwd2: "${ALIAS=pwd1}"
# Public key encrypted secret (can only be decrypted by private key)
pwd3: "${RSA=aGr3sFCMQznixrgbIk9qNfoLnO1cdi3H86qweCNjxFvH4dYg5IQM1EuoyTjJaXcSCG5MBskpeA3bjnWYrzeAFFlZHuYSPsb+wJVzGLrfUColTn+BPJjpJ3rmEd3AVkJl1ASfBBMh3q3deC+rvUdhfoTGBO8sC0teUATklCQSxfHOnIxswxqrplnoGXToGiTIfehiN2IZNulRKeoDQ0AeoKREmq5au4L8OOmS+D9BqnlKMc0F1tULZ7+h3Cxla4lXC5WRPoPfHBU4vzRZOGzeDvLkRgrD60caw/wKn5M0Wy1A1cKR8E46ceBXCjJ2eWIcLyhZSAZWDe3ceNrawHZtCg==}"
# "master" password encrypted password
pwd4: "${AES=YbaZGjQfwOv0htF2nmRYaOMYp0+qY/IRQUlWHfRKeTw6Q2uy33Rp8ZhTwv0oDywE}"

# empty string
pwd5: "${RSA=vjjRO06oe/odWcPiJ9SpFkzjGmb4wLs8gRWTI4zJibi9Sa33nz9OMgDJrmeXv2/zKZGzvK4ihnyA4L70mu/nHnSFQ1ryTDJvrjsj0+Tt00bp1tk5h5xqYKVX54jmmC4jPe5qXcNrfIh9zVTBuVKWzv8dlE08zo/b0Qs/YaEin79ACQ645Fib0xolWeVIWwcMotRIVuez9yVYHSbC8Esc8qMVLTzXOswe0Sx9L/KwIScSw18ef/w98IGD0dfSD+xuMs/T2gYJDqyEHOPfF6t9d26851g/+a3WhZgglV7iQzg30e55v3uEF+GmsxMKLD38FAQRnQj2QYlDvCzOuRcA4Q==}"
pwd6: "${AES=D/UgMzsNb265HU1NDvdzm7tACHdsW6u1PjYEcRkV/OLiWcI+ET6Q4MKCz0zHyEh9}"
# encrypted alias
pwd7: "${ALIAS=pwd3}"
# missing alias
pwd8: "${ALIAS=missing}"
# wrong encryption
pwd9: "${AES=not really encrypted}"
pwd10: "${RSA=not really encrypted}"

pwd11: "${ALIAS=pwd2}"
pwd12: "${ALIAS=pwd11}"

passwords: [
    "${RSA=aGr3sFCMQznixrgbIk9qNfoLnO1cdi3H86qweCNjxFvH4dYg5IQM1EuoyTjJaXcSCG5MBskpeA3bjnWYrzeAFFlZHuYSPsb+wJVzGLrfUColTn+BPJjpJ3rmEd3AVkJl1ASfBBMh3q3deC+rvUdhfoTGBO8sC0teUATklCQSxfHOnIxswxqrplnoGXToGiTIfehiN2IZNulRKeoDQ0AeoKREmq5au4L8OOmS+D9BqnlKMc0F1tULZ7+h3Cxla4lXC5WRPoPfHBU4vzRZOGzeDvLkRgrD60caw/wKn5M0Wy1A1cKR8E46ceBXCjJ2eWIcLyhZSAZWDe3ceNrawHZtCg==}",
    "${AES=LrbVVJOnn82fjl9ioV0pIDnYDhoNZp21KIEIjX8nTadlnlM8VQu2XXjJv8MFfHgm}",
    "${AES=xAzTBAstoNzvq2qk7szFGreIEfdxNx4OkIuLZHMUO/+p2441Sd4DkdmqgFKv0zNx}"
]

objects: [
    {
        pwd: "${AES=gMTQIU+zcu9UPkGY8IKpYoVV2sxPna4O6rtlgKXtkqspSyxbLJMiu+VgqZq7okMX}"
    },
    {
        pwd: "${AES=DalgBVpVjvbqNgC+jCM5AmMG0rr4BlTf0XQbJVs85ukch/PsF8reJ1NqGHF1GqgN}"
    }
]

customEnc: "${URGH=argh}"
