├── .editorconfig ├── .gitattributes ├── .github └── workflows │ ├── build_config_server.yaml │ ├── build_eureka_server.yaml │ ├── build_springboot_admin_server.yaml │ └── build_uaa_server.yaml ├── .gitignore ├── LICENSE ├── README.adoc ├── build.ps1 ├── config-server ├── Dockerfile ├── README.adoc ├── metadata │ ├── ADDITIONAL_TAGS │ ├── IMAGE_REVISION │ └── IMAGE_VERSION └── patches │ ├── application.properties.patch │ └── enableconfigserver.patch ├── eureka-server ├── Dockerfile ├── README.adoc ├── metadata │ ├── ADDITIONAL_TAGS │ ├── IMAGE_REVISION │ └── IMAGE_VERSION └── patches │ ├── application.properties.patch │ └── enable-eureka.patch ├── spring-boot-admin ├── Dockerfile ├── README.adoc ├── metadata │ ├── ADDITIONAL_TAGS │ ├── IMAGE_REVISION │ └── IMAGE_VERSION └── patches │ ├── application.properties.patch │ └── enable-springbootadmin.patch └── uaa-server ├── Dockerfile ├── README.md ├── log4j2.properties ├── metadata ├── ADDITIONAL_TAGS ├── IMAGE_REVISION └── IMAGE_VERSION └── uaa.yml /.editorconfig: -------------------------------------------------------------------------------- 1 | # ============================================================================= 2 | # https://EditorConfig.org 3 | # ============================================================================= 4 | 5 | root = true 6 | 7 | [*] 8 | indent_style = space 9 | indent_size = 4 10 | trim_trailing_whitespace = true 11 | insert_final_newline = true 12 | charset = utf-8 13 | -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | *.jar binary 2 | * text eol=lf 3 | -------------------------------------------------------------------------------- /.github/workflows/build_config_server.yaml: -------------------------------------------------------------------------------- 1 | name: Build Config Server 2 | 3 | on: 4 | pull_request: 5 | branches: 6 | - main 7 | paths: 8 | - '.github/workflows/build_config_server.yaml' 9 | - 'config-server/**' 10 | push: 11 | branches: 12 | - main 13 | paths: 14 | - '.github/workflows/build_config_server.yaml' 15 | - 'config-server/**' 16 | 17 | concurrency: 18 | group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} 19 | cancel-in-progress: true 20 | 21 | permissions: 22 | contents: read 23 | pull-requests: 'write' 24 | 25 | env: 26 | IMAGE_NAME: config-server 27 | REGISTRY: ${{ vars.DOCKER_REGISTRY }} 28 | 29 | jobs: 30 | build-push: 31 | name: Build and push image 32 | runs-on: ubuntu-latest 33 | steps: 34 | - uses: actions/checkout@v4 35 | 36 | - name: Build Image 37 | run: ./build.ps1 -Name '${{ env.IMAGE_NAME }}' -Registry '${{ env.REGISTRY }}' -Tag '${{ env.TAG }}' 38 | shell: pwsh 39 | env: 40 | TAG: ${{ github.event_name == 'pull_request' && format('-t {0}/{1}:pr-{2}', env.REGISTRY, env.IMAGE_NAME, github.event.number) || '' }} 41 | 42 | - name: Login to container registry 43 | uses: docker/login-action@v3 44 | with: 45 | registry: ${{ vars.DOCKER_REGISTRY }} 46 | username: ${{ secrets.DOCKER_USERNAME }} 47 | password: ${{ secrets.DOCKER_PASSWORD }} 48 | 49 | - name: Push image 50 | run: docker push --all-tags ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} 51 | 52 | - uses: actions/github-script@v7 53 | if: ${{ github.event_name == 'pull_request' }} 54 | with: 55 | script: | 56 | github.rest.issues.createComment({ 57 | issue_number: context.issue.number, 58 | owner: context.repo.owner, 59 | repo: context.repo.repo, 60 | body: `To run the Spring Cloud Config Server image built for this pull request: 61 | \`\`\`bash 62 | docker run --rm -d --pull=always -p 8888:8888 --name config-pr steeltoe.azurecr.io/config-server:pr-${{ github.event.number }} 63 | \`\`\`` 64 | }) 65 | -------------------------------------------------------------------------------- /.github/workflows/build_eureka_server.yaml: -------------------------------------------------------------------------------- 1 | name: Build Eureka Server 2 | 3 | on: 4 | pull_request: 5 | branches: 6 | - main 7 | paths: 8 | - '.github/workflows/build_eureka_server.yaml' 9 | - 'eureka-server/**' 10 | push: 11 | branches: 12 | - main 13 | paths: 14 | - '.github/workflows/build_eureka_server.yaml' 15 | - 'eureka-server/**' 16 | 17 | concurrency: 18 | group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} 19 | cancel-in-progress: true 20 | 21 | permissions: 22 | contents: read 23 | pull-requests: 'write' 24 | 25 | env: 26 | IMAGE_NAME: eureka-server 27 | REGISTRY: ${{ vars.DOCKER_REGISTRY }} 28 | 29 | jobs: 30 | build-push: 31 | name: Build and push image 32 | runs-on: ubuntu-latest 33 | steps: 34 | - uses: actions/checkout@v4 35 | 36 | - name: Build Image 37 | run: ./build.ps1 -Name '${{ env.IMAGE_NAME }}' -Registry '${{ env.REGISTRY }}' -Tag '${{ env.TAG }}' 38 | shell: pwsh 39 | env: 40 | TAG: ${{ github.event_name == 'pull_request' && format('-t {0}/{1}:pr-{2}', env.REGISTRY, env.IMAGE_NAME, github.event.number) || '' }} 41 | 42 | - name: Login to container registry 43 | uses: docker/login-action@v3 44 | with: 45 | registry: ${{ vars.DOCKER_REGISTRY }} 46 | username: ${{ secrets.DOCKER_USERNAME }} 47 | password: ${{ secrets.DOCKER_PASSWORD }} 48 | 49 | - name: Push image 50 | run: docker push --all-tags ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} 51 | 52 | - uses: actions/github-script@v7 53 | if: ${{ github.event_name == 'pull_request' }} 54 | with: 55 | script: | 56 | github.rest.issues.createComment({ 57 | issue_number: context.issue.number, 58 | owner: context.repo.owner, 59 | repo: context.repo.repo, 60 | body: `To run the Eureka server image built for this pull request: 61 | \`\`\`bash 62 | docker run --rm -d --pull=always -p 8761:8761 --name eureka-pr steeltoe.azurecr.io/eureka-server:pr-${{ github.event.number }} 63 | \`\`\`` 64 | }) 65 | -------------------------------------------------------------------------------- /.github/workflows/build_springboot_admin_server.yaml: -------------------------------------------------------------------------------- 1 | name: Build Spring Boot Admin Server 2 | 3 | on: 4 | pull_request: 5 | branches: 6 | - main 7 | paths: 8 | - '.github/workflows/build_springboot_admin_server.yaml' 9 | - 'spring-boot-admin/**' 10 | push: 11 | branches: 12 | - main 13 | paths: 14 | - '.github/workflows/build_springboot_admin_server.yaml' 15 | - 'spring-boot-admin/**' 16 | 17 | concurrency: 18 | group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} 19 | cancel-in-progress: true 20 | 21 | permissions: 22 | contents: read 23 | pull-requests: 'write' 24 | 25 | env: 26 | IMAGE_NAME: spring-boot-admin 27 | REGISTRY: ${{ vars.DOCKER_REGISTRY }} 28 | 29 | jobs: 30 | build-push: 31 | name: Build and push image 32 | runs-on: ubuntu-latest 33 | steps: 34 | - uses: actions/checkout@v4 35 | 36 | - name: Build Image 37 | run: ./build.ps1 -Name '${{ env.IMAGE_NAME }}' -Registry '${{ env.REGISTRY }}' -Tag '${{ env.TAG }}' 38 | shell: pwsh 39 | env: 40 | TAG: ${{ github.event_name == 'pull_request' && format('-t {0}/{1}:pr-{2}', env.REGISTRY, env.IMAGE_NAME, github.event.number) || '' }} 41 | 42 | - name: Login to container registry 43 | uses: docker/login-action@v3 44 | with: 45 | registry: ${{ vars.DOCKER_REGISTRY }} 46 | username: ${{ secrets.DOCKER_USERNAME }} 47 | password: ${{ secrets.DOCKER_PASSWORD }} 48 | 49 | - name: Push image 50 | run: docker push --all-tags ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} 51 | 52 | - uses: actions/github-script@v7 53 | if: ${{ github.event_name == 'pull_request' }} 54 | with: 55 | script: | 56 | github.rest.issues.createComment({ 57 | issue_number: context.issue.number, 58 | owner: context.repo.owner, 59 | repo: context.repo.repo, 60 | body: `To run the Spring Boot Admin server image built for this pull request: 61 | \`\`\`bash 62 | docker run --rm -d --pull=always -p 9099:9099 --name sba-pr steeltoe.azurecr.io/spring-boot-admin:pr-${{ github.event.number }} 63 | \`\`\`` 64 | }) 65 | -------------------------------------------------------------------------------- /.github/workflows/build_uaa_server.yaml: -------------------------------------------------------------------------------- 1 | name: Build UAA Server 2 | 3 | on: 4 | pull_request: 5 | branches: 6 | - main 7 | paths: 8 | - '.github/workflows/build_uaa_server.yaml' 9 | - 'uaa-server/**' 10 | push: 11 | branches: 12 | - main 13 | paths: 14 | - '.github/workflows/build_uaa_server.yaml' 15 | - 'uaa-server/**' 16 | 17 | concurrency: 18 | group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} 19 | cancel-in-progress: true 20 | 21 | permissions: 22 | contents: read 23 | pull-requests: 'write' 24 | 25 | env: 26 | IMAGE_NAME: uaa-server 27 | REGISTRY: ${{ vars.DOCKER_REGISTRY }} 28 | 29 | jobs: 30 | build-push: 31 | name: Build and push image 32 | runs-on: ubuntu-latest 33 | steps: 34 | - uses: actions/checkout@v4 35 | 36 | - name: Build Image 37 | run: ./build.ps1 -Name '${{ env.IMAGE_NAME }}' -Registry '${{ env.REGISTRY }}' -Tag '${{ env.TAG }}' 38 | shell: pwsh 39 | env: 40 | TAG: ${{ github.event_name == 'pull_request' && format('-t {0}/{1}:pr-{2}', env.REGISTRY, env.IMAGE_NAME, github.event.number) || '' }} 41 | 42 | - name: Login to container registry 43 | uses: docker/login-action@v3 44 | with: 45 | registry: ${{ vars.DOCKER_REGISTRY }} 46 | username: ${{ secrets.DOCKER_USERNAME }} 47 | password: ${{ secrets.DOCKER_PASSWORD }} 48 | 49 | - name: Push image 50 | run: docker push --all-tags ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} 51 | 52 | - uses: actions/github-script@v7 53 | if: ${{ github.event_name == 'pull_request' }} 54 | with: 55 | script: | 56 | github.rest.issues.createComment({ 57 | issue_number: context.issue.number, 58 | owner: context.repo.owner, 59 | repo: context.repo.repo, 60 | body: `To run the UAA server image built for this pull request: 61 | \`\`\`bash 62 | docker run --rm -d --pull=always -p 8080:8080 --name uaa-pr steeltoe.azurecr.io/uaa-server:pr-${{ github.event.number }} 63 | \`\`\`` 64 | }) 65 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # IntelliJ 2 | .idea/ 3 | 4 | # Vi/Vim 5 | *.swp 6 | 7 | # Gradle 8 | /.gradle/ 9 | build/ 10 | 11 | # MacOS 12 | .DS_Store 13 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Apache License 2 | Version 2.0, January 2004 3 | https://www.apache.org/licenses/ 4 | 5 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 6 | 7 | 1. Definitions. 8 | 9 | "License" shall mean the terms and conditions for use, reproduction, 10 | and distribution as defined by Sections 1 through 9 of this document. 11 | 12 | "Licensor" shall mean the copyright owner or entity authorized by 13 | the copyright owner that is granting the License. 14 | 15 | "Legal Entity" shall mean the union of the acting entity and all 16 | other entities that control, are controlled by, or are under common 17 | control with that entity. For the purposes of this definition, 18 | "control" means (i) the power, direct or indirect, to cause the 19 | direction or management of such entity, whether by contract or 20 | otherwise, or (ii) ownership of fifty percent (50%) or more of the 21 | outstanding shares, or (iii) beneficial ownership of such entity. 22 | 23 | "You" (or "Your") shall mean an individual or Legal Entity 24 | exercising permissions granted by this License. 25 | 26 | "Source" form shall mean the preferred form for making modifications, 27 | including but not limited to software source code, documentation 28 | source, and configuration files. 29 | 30 | "Object" form shall mean any form resulting from mechanical 31 | transformation or translation of a Source form, including but 32 | not limited to compiled object code, generated documentation, 33 | and conversions to other media types. 34 | 35 | "Work" shall mean the work of authorship, whether in Source or 36 | Object form, made available under the License, as indicated by a 37 | copyright notice that is included in or attached to the work 38 | (an example is provided in the Appendix below). 39 | 40 | "Derivative Works" shall mean any work, whether in Source or Object 41 | form, that is based on (or derived from) the Work and for which the 42 | editorial revisions, annotations, elaborations, or other modifications 43 | represent, as a whole, an original work of authorship. For the purposes 44 | of this License, Derivative Works shall not include works that remain 45 | separable from, or merely link (or bind by name) to the interfaces of, 46 | the Work and Derivative Works thereof. 47 | 48 | "Contribution" shall mean any work of authorship, including 49 | the original version of the Work and any modifications or additions 50 | to that Work or Derivative Works thereof, that is intentionally 51 | submitted to Licensor for inclusion in the Work by the copyright owner 52 | or by an individual or Legal Entity authorized to submit on behalf of 53 | the copyright owner. For the purposes of this definition, "submitted" 54 | means any form of electronic, verbal, or written communication sent 55 | to the Licensor or its representatives, including but not limited to 56 | communication on electronic mailing lists, source code control systems, 57 | and issue tracking systems that are managed by, or on behalf of, the 58 | Licensor for the purpose of discussing and improving the Work, but 59 | excluding communication that is conspicuously marked or otherwise 60 | designated in writing by the copyright owner as "Not a Contribution." 61 | 62 | "Contributor" shall mean Licensor and any individual or Legal Entity 63 | on behalf of whom a Contribution has been received by Licensor and 64 | subsequently incorporated within the Work. 65 | 66 | 2. Grant of Copyright License. Subject to the terms and conditions of 67 | this License, each Contributor hereby grants to You a perpetual, 68 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 69 | copyright license to reproduce, prepare Derivative Works of, 70 | publicly display, publicly perform, sublicense, and distribute the 71 | Work and such Derivative Works in Source or Object form. 72 | 73 | 3. Grant of Patent License. Subject to the terms and conditions of 74 | this License, each Contributor hereby grants to You a perpetual, 75 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 76 | (except as stated in this section) patent license to make, have made, 77 | use, offer to sell, sell, import, and otherwise transfer the Work, 78 | where such license applies only to those patent claims licensable 79 | by such Contributor that are necessarily infringed by their 80 | Contribution(s) alone or by combination of their Contribution(s) 81 | with the Work to which such Contribution(s) was submitted. If You 82 | institute patent litigation against any entity (including a 83 | cross-claim or counterclaim in a lawsuit) alleging that the Work 84 | or a Contribution incorporated within the Work constitutes direct 85 | or contributory patent infringement, then any patent licenses 86 | granted to You under this License for that Work shall terminate 87 | as of the date such litigation is filed. 88 | 89 | 4. Redistribution. You may reproduce and distribute copies of the 90 | Work or Derivative Works thereof in any medium, with or without 91 | modifications, and in Source or Object form, provided that You 92 | meet the following conditions: 93 | 94 | (a) You must give any other recipients of the Work or 95 | Derivative Works a copy of this License; and 96 | 97 | (b) You must cause any modified files to carry prominent notices 98 | stating that You changed the files; and 99 | 100 | (c) You must retain, in the Source form of any Derivative Works 101 | that You distribute, all copyright, patent, trademark, and 102 | attribution notices from the Source form of the Work, 103 | excluding those notices that do not pertain to any part of 104 | the Derivative Works; and 105 | 106 | (d) If the Work includes a "NOTICE" text file as part of its 107 | distribution, then any Derivative Works that You distribute must 108 | include a readable copy of the attribution notices contained 109 | within such NOTICE file, excluding those notices that do not 110 | pertain to any part of the Derivative Works, in at least one 111 | of the following places: within a NOTICE text file distributed 112 | as part of the Derivative Works; within the Source form or 113 | documentation, if provided along with the Derivative Works; or, 114 | within a display generated by the Derivative Works, if and 115 | wherever such third-party notices normally appear. The contents 116 | of the NOTICE file are for informational purposes only and 117 | do not modify the License. You may add Your own attribution 118 | notices within Derivative Works that You distribute, alongside 119 | or as an addendum to the NOTICE text from the Work, provided 120 | that such additional attribution notices cannot be construed 121 | as modifying the License. 122 | 123 | You may add Your own copyright statement to Your modifications and 124 | may provide additional or different license terms and conditions 125 | for use, reproduction, or distribution of Your modifications, or 126 | for any such Derivative Works as a whole, provided Your use, 127 | reproduction, and distribution of the Work otherwise complies with 128 | the conditions stated in this License. 129 | 130 | 5. Submission of Contributions. Unless You explicitly state otherwise, 131 | any Contribution intentionally submitted for inclusion in the Work 132 | by You to the Licensor shall be under the terms and conditions of 133 | this License, without any additional terms or conditions. 134 | Notwithstanding the above, nothing herein shall supersede or modify 135 | the terms of any separate license agreement you may have executed 136 | with Licensor regarding such Contributions. 137 | 138 | 6. Trademarks. This License does not grant permission to use the trade 139 | names, trademarks, service marks, or product names of the Licensor, 140 | except as required for reasonable and customary use in describing the 141 | origin of the Work and reproducing the content of the NOTICE file. 142 | 143 | 7. Disclaimer of Warranty. Unless required by applicable law or 144 | agreed to in writing, Licensor provides the Work (and each 145 | Contributor provides its Contributions) on an "AS IS" BASIS, 146 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 147 | implied, including, without limitation, any warranties or conditions 148 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A 149 | PARTICULAR PURPOSE. You are solely responsible for determining the 150 | appropriateness of using or redistributing the Work and assume any 151 | risks associated with Your exercise of permissions under this License. 152 | 153 | 8. Limitation of Liability. In no event and under no legal theory, 154 | whether in tort (including negligence), contract, or otherwise, 155 | unless required by applicable law (such as deliberate and grossly 156 | negligent acts) or agreed to in writing, shall any Contributor be 157 | liable to You for damages, including any direct, indirect, special, 158 | incidental, or consequential damages of any character arising as a 159 | result of this License or out of the use or inability to use the 160 | Work (including but not limited to damages for loss of goodwill, 161 | work stoppage, computer failure or malfunction, or any and all 162 | other commercial damages or losses), even if such Contributor 163 | has been advised of the possibility of such damages. 164 | 165 | 9. Accepting Warranty or Additional Liability. While redistributing 166 | the Work or Derivative Works thereof, You may choose to offer, 167 | and charge a fee for, acceptance of support, warranty, indemnity, 168 | or other liability obligations and/or rights consistent with this 169 | License. However, in accepting such obligations, You may act only 170 | on Your own behalf and on Your sole responsibility, not on behalf 171 | of any other Contributor, and only if You agree to indemnify, 172 | defend, and hold each Contributor harmless for any liability 173 | incurred by, or claims asserted against, such Contributor by reason 174 | of your accepting any such warranty or additional liability. 175 | 176 | END OF TERMS AND CONDITIONS 177 | 178 | APPENDIX: How to apply the Apache License to your work. 179 | 180 | To apply the Apache License to your work, attach the following 181 | boilerplate notice, with the fields enclosed by brackets "{}" 182 | replaced with your own identifying information. (Don't include 183 | the brackets!) The text should be enclosed in the appropriate 184 | comment syntax for the file format. We also recommend that a 185 | file or class name and description of purpose be included on the 186 | same "printed page" as the copyright notice for easier 187 | identification within third-party archives. 188 | 189 | Copyright {yyyy} {name of copyright owner} 190 | 191 | Licensed under the Apache License, Version 2.0 (the "License"); 192 | you may not use this file except in compliance with the License. 193 | You may obtain a copy of the License at 194 | 195 | https://www.apache.org/licenses/LICENSE-2.0 196 | 197 | Unless required by applicable law or agreed to in writing, software 198 | distributed under the License is distributed on an "AS IS" BASIS, 199 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 200 | See the License for the specific language governing permissions and 201 | limitations under the License. 202 | -------------------------------------------------------------------------------- /README.adoc: -------------------------------------------------------------------------------- 1 | = SteeltoeOSS Docker Images 2 | :toc: preamble 3 | :toclevels: 1 4 | :!toc-title: 5 | :linkattrs: 6 | 7 | GitHub repo for server images to use for local development with SteeltoeOSS. 8 | 9 | == Building 10 | 11 | .Build a specific image: 12 | ---- 13 | ./build.ps1 config-server 14 | ---- 15 | 16 | == Running 17 | 18 | .List the created images: 19 | 20 | ---- 21 | docker images 22 | ---- 23 | 24 | See the link:https://github.com/SteeltoeOSS/Samples/blob/main/CommonTasks.md/[docker instructions] on how to run the various docker images. 25 | 26 | == Images 27 | 28 | |=== 29 | |Name |Description 30 | 31 | |link:config-server/[steeltoe.azurecr.io/config-server] 32 | | Spring Cloud Config Server 33 | 34 | |link:eureka-server/[steeltoe.azurecr.io/eureka-server] 35 | | Netflix Eureka Server 36 | 37 | |link:spring-boot-admin/[steeltoe.azurecr.io/spring-boot-admin] 38 | | Spring Boot Admin 39 | 40 | |link:uaa-server/[steeltoe.azurecr.io/uaa-server] 41 | | CloudFoundry UAA Server 42 | 43 | |=== 44 | 45 | == Debug Image Building 46 | 47 | Via link:https://stackoverflow.com/questions/32353055/how-to-start-a-stopped-docker-container-with-a-different-command/39329138#39329138[StackOverflow], here are the commands to list files in a stopped container. 48 | 49 | 1. Find the id of the stopped container 50 | * `docker ps -a` 51 | 2. Commit the stopped container to a new image: test_image. 52 | * `docker commit $CONTAINER_ID test_image` 53 | 3. Run the new image in a new container with a shell. 54 | * `docker run -ti --entrypoint=sh test_image` 55 | 56 | -------------------------------------------------------------------------------- /build.ps1: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env pwsh 2 | 3 | # ============================================================================= 4 | # build.ps1: build script for SteeltoeOSS Docker images 5 | # ============================================================================= 6 | 7 | # ----------------------------------------------------------------------------- 8 | # help 9 | # ----------------------------------------------------------------------------- 10 | 11 | <# 12 | .SYNOPSIS 13 | Build Steeltoe Docker images 14 | 15 | .DESCRIPTION 16 | Builds a specified Steeltoe Docker image. 17 | 18 | By default, the image will be tagged using the name ':[[-]]' where: 19 | image the specified Image name 20 | version the value of 'IMAGE_VERSION' if specified in Dockerfile 21 | rev the value of 'IMAGE_REVISION' if specified in Dockerfile 22 | 23 | .PARAMETER Help 24 | Print this message. 25 | 26 | .PARAMETER List 27 | List available images. 28 | 29 | .PARAMETER Name 30 | Docker image name. 31 | 32 | .PARAMETER Tag 33 | Override the image tag. 34 | 35 | .PARAMETER Registry 36 | Set the container registry. Defaults to dockerhub under steeltoeoss. 37 | #> 38 | 39 | # ----------------------------------------------------------------------------- 40 | # args 41 | # ----------------------------------------------------------------------------- 42 | 43 | param ( 44 | [Switch] $Help, 45 | [Switch] $List, 46 | [String] $Name, 47 | [String] $Tag, 48 | [String] $Registry 49 | ) 50 | 51 | # ----------------------------------------------------------------------------- 52 | # impl 53 | # ----------------------------------------------------------------------------- 54 | 55 | if ($Registry) 56 | { 57 | $DockerOrg = $Registry 58 | } 59 | else 60 | { 61 | $DockerOrg = "steeltoeoss" 62 | } 63 | 64 | if ($Help) 65 | { 66 | Get-Help $PSCommandPath -Detailed 67 | return 68 | } 69 | 70 | if ($Name -And $List) 71 | { 72 | throw "-Name and -List are mutually exclusive" 73 | } 74 | 75 | $ImagesDirectory = Split-Path -Parent $PSCommandPath 76 | 77 | if ($List) 78 | { 79 | Get-Childitem -Path $ImagesDirectory -Directory | Where-Object { !$_.Name.StartsWith(".") } | Select-Object Name 80 | return 81 | } 82 | 83 | if (!$Name) 84 | { 85 | throw "Name not specified; run with -Help for help" 86 | } 87 | 88 | $ImageDirectory = Join-Path $ImagesDirectory $Name 89 | if (!(Test-Path $ImageDirectory)) 90 | { 91 | throw "Unknown image $Name; run with -List to list available images" 92 | } 93 | 94 | if (!(Get-Command "docker" -ErrorAction SilentlyContinue)) 95 | { 96 | throw "'docker' command not found" 97 | } 98 | 99 | $Dockerfile = Join-Path $ImageDirectory Dockerfile 100 | if (!(Test-Path $Dockerfile)) 101 | { 102 | throw "No Dockerfile for $Name (expected $Dockerfile)" 103 | } 104 | 105 | if (!$Tag) 106 | { 107 | if (Test-Path "$ImageDirectory/metadata") 108 | { 109 | $Tag = "-t $DockerOrg/$Name" 110 | $Version = Get-Content "$ImageDirectory/metadata/IMAGE_VERSION" 111 | $Tag += ":$Version" 112 | $Revision = Get-Content "$ImageDirectory/metadata/IMAGE_REVISION" 113 | if ($Revision) 114 | { 115 | $Tag += "-$Revision" 116 | } 117 | $Tag += " $(Get-Content $ImageDirectory/metadata/ADDITIONAL_TAGS | ForEach-Object { $_.replace("$Name","$DockerOrg/$Name") })" 118 | } 119 | else 120 | { 121 | throw "No metadata found for $Name" 122 | } 123 | } 124 | else 125 | { 126 | Write-Host "Tag value set by script parameter:" $Tag 127 | } 128 | 129 | $docker_command = "docker build $Tag $ImageDirectory" 130 | Write-Host $docker_command 131 | Invoke-Expression $docker_command 132 | -------------------------------------------------------------------------------- /config-server/Dockerfile: -------------------------------------------------------------------------------- 1 | # ----------------------------------------------------------------------------- 2 | # Spring Config Server Build 3 | # ----------------------------------------------------------------------------- 4 | ARG JVM=21 5 | 6 | FROM eclipse-temurin:$JVM-alpine AS build 7 | ARG JVM 8 | WORKDIR /scratch 9 | RUN apk update && apk add ca-certificates && apk add curl && apk add patch 10 | RUN curl --get https://start.spring.io/starter.zip \ 11 | -d type=gradle-project \ 12 | -d bootVersion=3.4.1 \ 13 | -d javaVersion=$JVM \ 14 | -d groupId=io.steeltoe.docker \ 15 | -d artifactId=configserver \ 16 | -d applicationName=ConfigServer \ 17 | -d language=java \ 18 | -d dependencies=cloud-config-server,actuator,cloud-eureka \ 19 | -d version=4.2.0 \ 20 | --output configserver.zip 21 | RUN mkdir configserver && unzip -d configserver configserver.zip 22 | COPY metadata metadata 23 | COPY patches patches 24 | RUN for patch in patches/*.patch; do \ 25 | echo "applying patch $(basename $patch)"; \ 26 | cd configserver; \ 27 | patch -p1 < ../$patch; \ 28 | cd ..; \ 29 | done 30 | RUN configserver/gradlew bootJar --project-dir configserver --no-daemon 31 | RUN mkdir output && \ 32 | cp "configserver/build/libs/configserver-$(cat metadata/IMAGE_VERSION).jar" output/configserver.jar && \ 33 | cp configserver/src/main/resources/application.properties output/application.properties 34 | 35 | # ----------------------------------------------------------------------------- 36 | # Spring Config Server Linux Image 37 | # ----------------------------------------------------------------------------- 38 | 39 | FROM eclipse-temurin:$JVM-alpine 40 | WORKDIR /config-server 41 | COPY --from=build /scratch/output . 42 | EXPOSE 8888 43 | ENTRYPOINT ["java", "-Djava.security.egd=file:/dev/./urandom", "-Dspring.config.location=/config-server/application.properties", "-jar", "configserver.jar"] 44 | -------------------------------------------------------------------------------- /config-server/README.adoc: -------------------------------------------------------------------------------- 1 | = steeltoe.azurecr.io/config-server 2 | :toc: preamble 3 | :toclevels: 1 4 | :!toc-title: 5 | :linkattrs: 6 | 7 | Image for SteeltoeOSS local development with https://cloud.spring.io/spring-cloud-config/[Spring Cloud Config Server]. 8 | 9 | == Running 10 | 11 | .Default Configuration 12 | ---- 13 | $ docker run --publish 8888:8888 steeltoe.azurecr.io/config-server 14 | ---- 15 | 16 | .Custom Git Repo Configuration 17 | ---- 18 | $ docker run --publish 8888:8888 steeltoe.azurecr.io/config-server \ 19 | --spring.cloud.config.server.git.uri=https://github.com/myorg/myrepo.git 20 | ---- 21 | 22 | .Local File System Configuration 23 | ---- 24 | $ docker run --publish 8888:8888 --volume /path/to/my/config:/config steeltoe.azurecr.io/config-server \ 25 | --spring.profiles.active=native \ 26 | --spring.cloud.config.server.native.searchLocations=file:///config 27 | ---- 28 | 29 | == Resources 30 | 31 | |=== 32 | |Path |Description 33 | 34 | |/_{app}_/_{profile}_ 35 | |Configuration data for app in Spring profile 36 | 37 | |/_{app}_/_{profile}_/_{label}_ 38 | |Add a git label 39 | 40 | |/_{app}_/_{profiles}/{label}_/_{path}_ 41 | |Environment-specific plain text config file at _{path}_ 42 | 43 | |=== 44 | 45 | _Example:_ http://localhost:8888/foo/bar 46 | -------------------------------------------------------------------------------- /config-server/metadata/ADDITIONAL_TAGS: -------------------------------------------------------------------------------- 1 | -t config-server:4.2 -t config-server:4 -t config-server:latest 2 | -------------------------------------------------------------------------------- /config-server/metadata/IMAGE_REVISION: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SteeltoeOSS/Dockerfiles/9ef47439ebbbf5cce617831c2b2a417281aee0b9/config-server/metadata/IMAGE_REVISION -------------------------------------------------------------------------------- /config-server/metadata/IMAGE_VERSION: -------------------------------------------------------------------------------- 1 | 4.2.0 2 | -------------------------------------------------------------------------------- /config-server/patches/application.properties.patch: -------------------------------------------------------------------------------- 1 | --- configserver/src/main/resources/application.properties 2024-02-21 15:43:09.000000000 -0600 2 | +++ configserver/src/main/resources/application.properties 2024-04-02 13:15:18.461432100 -0500 3 | @@ -0,0 +1,9 @@ 4 | +server.port = 8888 5 | +spring.cloud.config.server.git.uri = https://github.com/spring-cloud-samples/config-repo 6 | +eureka.client.enabled = false 7 | +eureka.client.fetchRegistry = false 8 | +eureka.client.serviceUrl.defaultZone=http://host.docker.internal:8761/eureka 9 | +eureka.instance.appname = configserver 10 | +eureka.instance.virtualhostname = configserver 11 | +eureka.instance.hostname = host.docker.internal 12 | +eureka.instance.instanceId = host.docker.internal:configserver:8888 13 | -------------------------------------------------------------------------------- /config-server/patches/enableconfigserver.patch: -------------------------------------------------------------------------------- 1 | --- configserver/src/main/java/io/steeltoe/docker/configserver/ConfigServer.java 2024-02-21 13:33:04.000000000 -0600 2 | +++ configserver/src/main/java/io/steeltoe/docker/configserver/ConfigServer.java 2024-04-02 13:40:40.622446300 -0600 3 | @@ -1,12 +1,23 @@ 4 | package io.steeltoe.docker.configserver; 5 | 6 | +import org.slf4j.Logger; 7 | +import org.slf4j.LoggerFactory; 8 | import org.springframework.boot.SpringApplication; 9 | import org.springframework.boot.autoconfigure.SpringBootApplication; 10 | +import org.springframework.cloud.client.discovery.EnableDiscoveryClient; 11 | +import org.springframework.cloud.config.server.EnableConfigServer; 12 | 13 | @SpringBootApplication 14 | +@EnableConfigServer 15 | +@EnableDiscoveryClient 16 | public class ConfigServer { 17 | 18 | + private static final Logger logger = LoggerFactory.getLogger(ConfigServer.class); 19 | + 20 | public static void main(String[] args) { 21 | + System.setProperty("spring.config.name", "configserver"); 22 | + Package pkg = EnableConfigServer.class.getPackage(); 23 | + logger.info("{} {} by {}", pkg.getImplementationTitle(), pkg.getImplementationVersion(), pkg.getImplementationVendor()); 24 | SpringApplication.run(ConfigServer.class, args); 25 | } 26 | -------------------------------------------------------------------------------- /eureka-server/Dockerfile: -------------------------------------------------------------------------------- 1 | # ----------------------------------------------------------------------------- 2 | # Netflix Eureka Server Build 3 | # ----------------------------------------------------------------------------- 4 | ARG JVM=21 5 | 6 | FROM eclipse-temurin:$JVM-alpine AS build 7 | ARG JVM 8 | WORKDIR /scratch 9 | RUN apk update && apk add ca-certificates && apk add curl && apk add patch 10 | RUN curl --get https://start.spring.io/starter.zip \ 11 | -d type=gradle-project \ 12 | -d bootVersion=3.4.1 \ 13 | -d javaVersion=$JVM \ 14 | -d groupId=io.steeltoe.docker \ 15 | -d artifactId=eurekaserver \ 16 | -d applicationName=EurekaServer \ 17 | -d language=java \ 18 | -d dependencies=cloud-eureka-server,actuator \ 19 | -d version=4.2.0 \ 20 | --output eurekaserver.zip 21 | RUN mkdir eurekaserver && unzip -d eurekaserver eurekaserver.zip 22 | COPY metadata metadata 23 | COPY patches patches 24 | RUN for patch in patches/*.patch; do \ 25 | echo "applying patch $(basename $patch)"; \ 26 | cd eurekaserver; \ 27 | patch -p1 < ../$patch; \ 28 | cd ..; \ 29 | done 30 | RUN eurekaserver/gradlew bootJar --project-dir eurekaserver --no-daemon 31 | RUN mkdir output && \ 32 | cp "eurekaserver/build/libs/eurekaserver-$(cat metadata/IMAGE_VERSION).jar" output/eurekaserver.jar 33 | 34 | # ----------------------------------------------------------------------------- 35 | # Netflix Eureka Server Linux Image 36 | # ----------------------------------------------------------------------------- 37 | 38 | FROM eclipse-temurin:$JVM-alpine 39 | WORKDIR /eureka-server 40 | COPY --from=build /scratch/output . 41 | EXPOSE 8761 42 | ENTRYPOINT ["java", "-Djava.security.egd=file:/dev/./urandom", "-jar", "eurekaserver.jar"] 43 | -------------------------------------------------------------------------------- /eureka-server/README.adoc: -------------------------------------------------------------------------------- 1 | = steeltoe.azurecr.io/eureka-server 2 | :toc: preamble 3 | :toclevels: 1 4 | :!toc-title: 5 | :linkattrs: 6 | 7 | Image for SteeltoeOSS local development with https://cloud.spring.io/spring-cloud-netflix/[Spring Cloud Eureka Server]. 8 | 9 | == Running 10 | 11 | ---- 12 | $ docker run --publish 8761:8761 steeltoe.azurecr.io/eureka-server 13 | ---- 14 | 15 | == Resources 16 | 17 | |=== 18 | |Path |Description 19 | 20 | |/ 21 | |Service registration listing 22 | 23 | |/eureka/apps 24 | |Registration metadata 25 | 26 | |=== 27 | -------------------------------------------------------------------------------- /eureka-server/metadata/ADDITIONAL_TAGS: -------------------------------------------------------------------------------- 1 | -t eureka-server:4.2 -t eureka-server:4 -t eureka-server:latest 2 | -------------------------------------------------------------------------------- /eureka-server/metadata/IMAGE_REVISION: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SteeltoeOSS/Dockerfiles/9ef47439ebbbf5cce617831c2b2a417281aee0b9/eureka-server/metadata/IMAGE_REVISION -------------------------------------------------------------------------------- /eureka-server/metadata/IMAGE_VERSION: -------------------------------------------------------------------------------- 1 | 4.2.0 2 | -------------------------------------------------------------------------------- /eureka-server/patches/application.properties.patch: -------------------------------------------------------------------------------- 1 | --- eurekaserver/src/main/resources/application.properties 2024-02-21 15:43:09.000000000 -0600 2 | +++ eurekaserver/src/main/resources/application.properties 2024-04-02 13:15:18.461432100 -0500 3 | @@ -0,0 +1,8 @@ 4 | +server.port = 8761 5 | +eureka.client.fetch-registry = false 6 | +eureka.client.register-with-eureka = false 7 | +eureka.server.enable-self-preservation = false 8 | +eureka.server.evictionIntervalTimerInMs = 1000 9 | +eureka.server.responseCacheUpdateIntervalMs = 1000 10 | +eureka.server.wait-time-in-ms-when-sync-empty = 0 11 | +logging.level.com.netflix.eureka = TRACE 12 | -------------------------------------------------------------------------------- /eureka-server/patches/enable-eureka.patch: -------------------------------------------------------------------------------- 1 | --- eurekaserver/src/main/java/io/steeltoe/docker/eurekaserver/EurekaServer.java 2024-02-21 15:43:09.000000000 -0600 2 | +++ eurekaserver/src/main/java/io/steeltoe/docker/eurekaserver/EurekaServer.java 2024-02-21 16:45:53.258683900 -0600 3 | @@ -1,12 +1,20 @@ 4 | package io.steeltoe.docker.eurekaserver; 5 | 6 | +import org.slf4j.Logger; 7 | +import org.slf4j.LoggerFactory; 8 | import org.springframework.boot.SpringApplication; 9 | import org.springframework.boot.autoconfigure.SpringBootApplication; 10 | +import org.springframework.cloud.netflix.eureka.server.EnableEurekaServer; 11 | 12 | @SpringBootApplication 13 | +@EnableEurekaServer 14 | public class EurekaServer { 15 | 16 | + private static final Logger logger = LoggerFactory.getLogger(EurekaServer.class); 17 | + 18 | public static void main(String[] args) { 19 | + Package pkg = EnableEurekaServer.class.getPackage(); 20 | + logger.info("{} {} by {}", pkg.getImplementationTitle(), pkg.getImplementationVersion(), pkg.getImplementationVendor()); 21 | SpringApplication.run(EurekaServer.class, args); 22 | } 23 | 24 | -------------------------------------------------------------------------------- /spring-boot-admin/Dockerfile: -------------------------------------------------------------------------------- 1 | # ----------------------------------------------------------------------------- 2 | # Spring Boot Admin Server Build 3 | # ----------------------------------------------------------------------------- 4 | ARG JVM=21 5 | 6 | FROM eclipse-temurin:$JVM-alpine AS build 7 | ARG JVM 8 | WORKDIR /scratch 9 | RUN apk update && apk add ca-certificates && apk add curl && apk add patch 10 | RUN curl https://start.spring.io/starter.zip \ 11 | -d type=gradle-project \ 12 | -d bootVersion=3.4.3 \ 13 | -d javaVersion=$JVM \ 14 | -d groupId=io.steeltoe.docker \ 15 | -d artifactId=springbootadmin \ 16 | -d applicationName=SpringBootAdmin \ 17 | -d language=java \ 18 | -d dependencies=codecentric-spring-boot-admin-server \ 19 | -d version=3.4.3 \ 20 | --output springbootadmin.zip 21 | RUN mkdir springbootadmin && unzip -d springbootadmin springbootadmin.zip 22 | COPY metadata metadata 23 | COPY patches patches 24 | RUN for patch in patches/*.patch; do \ 25 | echo "applying patch $(basename $patch)"; \ 26 | cd springbootadmin; \ 27 | patch -p1 < ../$patch; \ 28 | cd ..; \ 29 | done 30 | RUN springbootadmin/gradlew bootJar --project-dir springbootadmin --no-daemon 31 | RUN mkdir output && \ 32 | cp "springbootadmin/build/libs/springbootadmin-$(cat metadata/IMAGE_VERSION).jar" output/springbootadmin.jar 33 | 34 | # ----------------------------------------------------------------------------- 35 | # Spring Boot Admin Server Linux Image 36 | # ----------------------------------------------------------------------------- 37 | 38 | FROM eclipse-temurin:$JVM-alpine 39 | WORKDIR /springbootadmin 40 | COPY --from=build /scratch/output . 41 | EXPOSE 9099 42 | ENTRYPOINT ["java", "-Djava.security.egd=file:/dev/./urandom", "-jar", "springbootadmin.jar"] 43 | -------------------------------------------------------------------------------- /spring-boot-admin/README.adoc: -------------------------------------------------------------------------------- 1 | = steeltoeoss/spring-boot-admin 2 | :toc: preamble 3 | :toclevels: 1 4 | :!toc-title: 5 | :linkattrs: 6 | 7 | Image for SteeltoeOSS local development with https://github.com/codecentric/spring-boot-admin. 8 | 9 | == Running 10 | 11 | ---- 12 | $ docker run --publish 9099:9099 steeltoeoss/spring-boot-admin 13 | ---- 14 | -------------------------------------------------------------------------------- /spring-boot-admin/metadata/ADDITIONAL_TAGS: -------------------------------------------------------------------------------- 1 | -t spring-boot-admin:3.4 -t spring-boot-admin:3 -t spring-boot-admin:latest 2 | -------------------------------------------------------------------------------- /spring-boot-admin/metadata/IMAGE_REVISION: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SteeltoeOSS/Dockerfiles/9ef47439ebbbf5cce617831c2b2a417281aee0b9/spring-boot-admin/metadata/IMAGE_REVISION -------------------------------------------------------------------------------- /spring-boot-admin/metadata/IMAGE_VERSION: -------------------------------------------------------------------------------- 1 | 3.4.3 2 | -------------------------------------------------------------------------------- /spring-boot-admin/patches/application.properties.patch: -------------------------------------------------------------------------------- 1 | --- ./src/main/resources/application.properties 2024-09-19 14:13:49.968047867 -0500 2 | +++ ./src/main/resources/application.properties 2024-09-19 14:13:24.727639700 -0500 3 | @@ -1 +1,2 @@ 4 | -spring.application.name=demo 5 | +spring.application.name=SpringBootAdmin 6 | +server.port=9099 7 | -------------------------------------------------------------------------------- /spring-boot-admin/patches/enable-springbootadmin.patch: -------------------------------------------------------------------------------- 1 | --- ./src/main/java/io/steeltoe/docker/springbootadmin/SpringBootAdmin.java 2024-09-20 12:49:35.099908129 -0500 2 | +++ ./src/main/java/io/steeltoe/docker/springbootadmin/SpringBootAdmin.java 2024-09-20 12:49:59.410273961 -0500 3 | @@ -2,8 +2,10 @@ 4 | 5 | import org.springframework.boot.SpringApplication; 6 | import org.springframework.boot.autoconfigure.SpringBootApplication; 7 | +import de.codecentric.boot.admin.server.config.EnableAdminServer; 8 | 9 | @SpringBootApplication 10 | +@EnableAdminServer 11 | public class SpringBootAdmin { 12 | 13 | public static void main(String[] args) { 14 | -------------------------------------------------------------------------------- /uaa-server/Dockerfile: -------------------------------------------------------------------------------- 1 | # ----------------------------------------------------------------------------- 2 | # UAA Server Build 3 | # ----------------------------------------------------------------------------- 4 | 5 | FROM cloudfoundry/uaa:77.20.0 6 | COPY uaa.yml /uaa/uaa.yml 7 | COPY log4j2.properties /uaa/log4j2.properties 8 | ENV CLOUDFOUNDRY_CONFIG_PATH=/uaa 9 | ENV SPRING_PROFILES=hsql,default 10 | EXPOSE 8080 11 | -------------------------------------------------------------------------------- /uaa-server/README.md: -------------------------------------------------------------------------------- 1 | # UAA Server for Steeltoe Samples 2 | 3 | This directory contains resources for building a [CloudFoundry User Account and Authentication (UAA)](https://github.com/cloudfoundry/uaa) Docker image that is customized to work with [Steeltoe Samples](https://github.com/SteeltoeOSS/Samples). 4 | 5 | ## Running Local 6 | 7 | To run this image locally: 8 | 9 | ```shell 10 | docker run -it -p 8080:8080 --name steeltoe-uaa steeltoe.azurecr.io/uaa-server:77 11 | ``` 12 | 13 | To run this image locally, overwriting the included `uaa.yml` file: 14 | 15 | ```shell 16 | docker run -it -p 8080:8080 --name steeltoe-uaa -v $pwd/uaa.yml:/uaa/uaa.yml steeltoe.azurecr.io/uaa-server:77 17 | ``` 18 | 19 | ## Customizing for your Cloud Foundry environment 20 | 21 | These instructions will help you build and deploy a custom image to use as an identity provider for [Single Sign-On for VMware Tanzu Application Service](https://docs.vmware.com/en/Single-Sign-On-for-VMware-Tanzu-Application-Service/index.html): 22 | 23 | 1. Clone this repository. 24 | 1. (Operator task) Create an [identity zone](https://docs.vmware.com/en/VMware-Tanzu-Application-Service/6.0/tas-for-vms/uaa-concepts.html#identity-zones-0) 25 | 1. Change the `redirect-uri` entry for `ssotile` in [uaa.yml](uaa.yml#132) to match your identity zone. 26 | 1. (OPTIONAL) Customize the name of the image you're about to build by renaming the `uaa-server` directory 27 | 1. `.\build.ps1 uaa-server`. 28 | 1. Push the image to an image repository accessible from your Cloud Foundry environment. 29 | 1. Deploy the image with a command similar to this: 30 | * `cf push steeltoe-uaa --docker-image steeltoe.azurecr.io/uaa-server:77` 31 | 1. (Operator task) [Add the new identity provider with OpenID Connect](https://docs.vmware.com/en/Single-Sign-On-for-VMware-Tanzu-Application-Service/1.14/sso/GUID-configure-external-id.html#config-ext-oidc) 32 | * Use the `ssotile` credentials from uaa.yml 33 | -------------------------------------------------------------------------------- /uaa-server/log4j2.properties: -------------------------------------------------------------------------------- 1 | status = error 2 | dest = err 3 | name = UaaLog 4 | 5 | property.log_pattern=[%d{yyyy-MM-dd'T'HH:mm:ss.nnnnnn}{GMT+0}Z] uaa%X{context} - %pid [%t] .... %5p --- %c{1}: %replace{%m}{(?<=password=|client_secret=)([^&]*)}{}%n 6 | 7 | appender.uaaDefaultAppender.type = File 8 | appender.uaaDefaultAppender.name = UaaDefaultAppender 9 | appender.uaaDefaultAppender.fileName = logs/uaa.log 10 | appender.uaaDefaultAppender.layout.type = PatternLayout 11 | appender.uaaDefaultAppender.layout.pattern = ${log_pattern} 12 | 13 | appender.uaaAuditAppender.type = File 14 | appender.uaaAuditAppender.name = UaaAuditAppender 15 | appender.uaaAuditAppender.fileName = logs/uaa_events.log 16 | appender.uaaAuditAppender.layout.type = PatternLayout 17 | appender.uaaAuditAppender.layout.pattern = ${log_pattern} 18 | 19 | rootLogger.level = debug 20 | rootLogger.appenderRef.uaaDefaultAppender.ref = UaaDefaultAppender 21 | 22 | logger.UAAAudit.name = UAA.Audit 23 | logger.UAAAudit.level = info 24 | logger.UAAAudit.additivity = true 25 | logger.UAAAudit.appenderRef.auditEventLog.ref = UaaAuditAppender 26 | 27 | logger.cfIdentity.name = org.cloudfoundry.identity 28 | logger.cfIdentity.level = info 29 | logger.cfIdentity.additivity = false 30 | logger.cfIdentity.appenderRef.uaaDefaultAppender.ref = UaaDefaultAppender 31 | -------------------------------------------------------------------------------- /uaa-server/metadata/ADDITIONAL_TAGS: -------------------------------------------------------------------------------- 1 | -t uaa-server:77.20 -t uaa-server:77 2 | -------------------------------------------------------------------------------- /uaa-server/metadata/IMAGE_REVISION: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SteeltoeOSS/Dockerfiles/9ef47439ebbbf5cce617831c2b2a417281aee0b9/uaa-server/metadata/IMAGE_REVISION -------------------------------------------------------------------------------- /uaa-server/metadata/IMAGE_VERSION: -------------------------------------------------------------------------------- 1 | 77.20.0 2 | -------------------------------------------------------------------------------- /uaa-server/uaa.yml: -------------------------------------------------------------------------------- 1 | # This file defines UAA configuration that is compatible with Steeltoe Sample applications. 2 | # Samples can be found in the repository at https://github.com/SteeltoeOSS/Samples 3 | logging: 4 | config: /uaa/log4j2.properties 5 | 6 | issuer: 7 | uri: http://localhost:8080/uaa 8 | 9 | encryption: 10 | encryption_keys: 11 | - label: uaa-encryption-key-1 12 | passphrase: password 13 | active_key_label: uaa-encryption-key-1 14 | 15 | scim: 16 | groups: 17 | zones.read: Read identity zones 18 | zones.write: Create and update identity zones 19 | idps.read: Retrieve identity providers 20 | idps.write: Create and update identity providers 21 | clients.admin: Create, modify and delete OAuth clients 22 | clients.write: Create and modify OAuth clients 23 | clients.read: Read information about OAuth clients 24 | clients.secret: Change the password of an OAuth client 25 | scim.write: Create, modify and delete SCIM entities, i.e. users and groups 26 | scim.read: Read all SCIM entities, i.e. users and groups 27 | scim.create: Create users 28 | scim.userids: Read user IDs and retrieve users by ID 29 | scim.zones: Control a user's ability to manage a zone 30 | scim.invite: Send invitations to users 31 | password.write: Change your password 32 | oauth.approval: Manage approved scopes 33 | oauth.login: Authenticate users outside of the UAA 34 | openid: Access profile information, i.e. email, first and last name, and phone number 35 | groups.update: Update group information and memberships 36 | uaa.user: Act as a user in the UAA 37 | uaa.resource: Serve resources protected by the UAA 38 | uaa.admin: Act as an administrator throughout the UAA 39 | uaa.none: Forbid acting as a user 40 | uaa.offline_token: Allow offline access 41 | # ----- ----- # 42 | order.me: Permission to read personal orders 43 | order.admin: Permission to read all orders 44 | menu.read: Permission to read all menu items 45 | menu.write: Permission to create, update, and delete menu items 46 | # ----- ----- # 47 | # ----- ----- # 48 | sampleapi.read: Permission to access a specific endpoint in the Steeltoe App Security Samples 49 | # ----- ----- # 50 | users: 51 | # ----- ----- # 52 | - customer|password|customer@testapp.com|Jon|Doe|menu.read,order.me 53 | - manager|password|manager@testapp.com|Jonathan|Doe|menu.read,menu.write,order.admin 54 | # ----- ----- # 55 | # ----- ----- # 56 | - testuser|password|user@testapp.com|Jane|Doe|sampleapi.read 57 | # ----- ----- # 58 | userids_enabled: true 59 | user: 60 | override: true 61 | 62 | require_https: false 63 | 64 | oauth: 65 | user: 66 | authorities: 67 | - openid 68 | - scim.me 69 | - cloud_controller.read 70 | - cloud_controller.write 71 | - cloud_controller_service_permissions.read 72 | - password.write 73 | - scim.userids 74 | - uaa.user 75 | - approvals.me 76 | - oauth.approvals 77 | - profile 78 | - roles 79 | - user_attributes 80 | - uaa.offline_token 81 | # Always override clients on startup 82 | client: 83 | override: true 84 | 85 | # List of OAuth clients 86 | clients: 87 | # ----- ----- # 88 | admin-portal: 89 | app-launch-url: http://localhost:63757/Home/ 90 | authorities: uaa.resource 91 | authorized-grant-types: authorization_code 92 | description: "UI Admin Portal for administering orders" 93 | redirect-uri: http://localhost:63757/signin-cloudfoundry 94 | scope: openid,menu.read,menu.write,order.admin 95 | secret: adminportal_secret 96 | show-on-homepage: true 97 | order-service: 98 | authorities: uaa.resource 99 | authorized-grant-types: client_credentials 100 | description: "API Service for administering orders" 101 | scope: openid,menu.write,order.admin 102 | secret: orderservice_secret 103 | customer-portal: 104 | authorities: uaa.resource 105 | authorized-grant-types: authorization_code 106 | redirect-uri: http://localhost:8082/login 107 | scope: openid,menu.read,order.me 108 | secret: customerportal_secret 109 | # ----- ---- # 110 | # --- --- # 111 | steeltoesamplesserver: 112 | authorities: uaa.resource, sampleapi.read 113 | authorized-grant-types: client_credentials 114 | description: Steeltoe application security Sample Server 115 | secret: server_secret 116 | steeltoesamplesclient: 117 | app-launch-url: https://localhost:7072 118 | authorized-grant-types: authorization_code, client_credentials 119 | autoapprove: 120 | - openid 121 | - profile 122 | description: Steeltoe application security Sample Client 123 | redirect-uri: https://localhost:7072/signin-oidc 124 | resource_ids: sampleapi.read 125 | scope: openid,profile,sampleapi.read 126 | secret: client_secret 127 | ssotile: 128 | authorized-grant-types: authorization_code, client_credentials 129 | autoapprove: 130 | - openid 131 | - profile 132 | description: Credentials for use with UAA server in Cloud Foundry environment 133 | 134 | # CHANGE THIS VALUE TO MATCH YOUR ENVIRONMENT 135 | redirect-uri: https://steeltoe.login.sys.dhaka.cf-app.com/** 136 | 137 | resource_ids: sampleapi.read 138 | scope: openid,profile,sampleapi.read 139 | secret: sso_secret 140 | # --- --- # 141 | jwt: 142 | token: 143 | refresh: 144 | format: opaque 145 | policy: 146 | # Will override global validity policies for the default zone only. 147 | #accessTokenValiditySeconds: 600 148 | activeKeyId: uaa-jwt-key-1 149 | keys: 150 | uaa-jwt-key-1: 151 | signingKey: | 152 | -----BEGIN RSA PRIVATE KEY----- 153 | MIICXQIBAAKBgQDHtC5gUXxBKpEqZTLkNvFwNGnNIkggNOwOQVNbpO0WVHIivig5 154 | L39WqS9u0hnA+O7MCA/KlrAR4bXaeVVhwfUPYBKIpaaTWFQR5cTR1UFZJL/OF9vA 155 | fpOwznoD66DDCnQVpbCjtDYWX+x6imxn8HCYxhMol6ZnTbSsFW6VZjFMjQIDAQAB 156 | AoGAVOj2Yvuigi6wJD99AO2fgF64sYCm/BKkX3dFEw0vxTPIh58kiRP554Xt5ges 157 | 7ZCqL9QpqrChUikO4kJ+nB8Uq2AvaZHbpCEUmbip06IlgdA440o0r0CPo1mgNxGu 158 | lhiWRN43Lruzfh9qKPhleg2dvyFGQxy5Gk6KW/t8IS4x4r0CQQD/dceBA+Ndj3Xp 159 | ubHfxqNz4GTOxndc/AXAowPGpge2zpgIc7f50t8OHhG6XhsfJ0wyQEEvodDhZPYX 160 | kKBnXNHzAkEAyCA76vAwuxqAd3MObhiebniAU3SnPf2u4fdL1EOm92dyFs1JxyyL 161 | gu/DsjPjx6tRtn4YAalxCzmAMXFSb1qHfwJBAM3qx3z0gGKbUEWtPHcP7BNsrnWK 162 | vw6By7VC8bk/ffpaP2yYspS66Le9fzbFwoDzMVVUO/dELVZyBnhqSRHoXQcCQQCe 163 | A2WL8S5o7Vn19rC0GVgu3ZJlUrwiZEVLQdlrticFPXaFrn3Md82ICww3jmURaKHS 164 | N+l4lnMda79eSp3OMmq9AkA0p79BvYsLshUJJnvbk76pCjR28PK4dV1gSDUEqQMB 165 | qy45ptdwJLqLJCeNoR0JUcDNIRhOCuOPND7pcMtX6hI/ 166 | -----END RSA PRIVATE KEY----- 167 | login: 168 | url: http://localhost:8080/uaa 169 | selfServiceLinksEnabled: false 170 | serviceProviderKey: | 171 | -----BEGIN RSA PRIVATE KEY----- 172 | MIICXQIBAAKBgQDHtC5gUXxBKpEqZTLkNvFwNGnNIkggNOwOQVNbpO0WVHIivig5 173 | L39WqS9u0hnA+O7MCA/KlrAR4bXaeVVhwfUPYBKIpaaTWFQR5cTR1UFZJL/OF9vA 174 | fpOwznoD66DDCnQVpbCjtDYWX+x6imxn8HCYxhMol6ZnTbSsFW6VZjFMjQIDAQAB 175 | AoGAVOj2Yvuigi6wJD99AO2fgF64sYCm/BKkX3dFEw0vxTPIh58kiRP554Xt5ges 176 | 7ZCqL9QpqrChUikO4kJ+nB8Uq2AvaZHbpCEUmbip06IlgdA440o0r0CPo1mgNxGu 177 | lhiWRN43Lruzfh9qKPhleg2dvyFGQxy5Gk6KW/t8IS4x4r0CQQD/dceBA+Ndj3Xp 178 | ubHfxqNz4GTOxndc/AXAowPGpge2zpgIc7f50t8OHhG6XhsfJ0wyQEEvodDhZPYX 179 | kKBnXNHzAkEAyCA76vAwuxqAd3MObhiebniAU3SnPf2u4fdL1EOm92dyFs1JxyyL 180 | gu/DsjPjx6tRtn4YAalxCzmAMXFSb1qHfwJBAM3qx3z0gGKbUEWtPHcP7BNsrnWK 181 | vw6By7VC8bk/ffpaP2yYspS66Le9fzbFwoDzMVVUO/dELVZyBnhqSRHoXQcCQQCe 182 | A2WL8S5o7Vn19rC0GVgu3ZJlUrwiZEVLQdlrticFPXaFrn3Md82ICww3jmURaKHS 183 | N+l4lnMda79eSp3OMmq9AkA0p79BvYsLshUJJnvbk76pCjR28PK4dV1gSDUEqQMB 184 | qy45ptdwJLqLJCeNoR0JUcDNIRhOCuOPND7pcMtX6hI/ 185 | -----END RSA PRIVATE KEY----- 186 | serviceProviderKeyPassword: "" 187 | serviceProviderCertificate: | 188 | -----BEGIN CERTIFICATE----- 189 | MIIDSTCCArKgAwIBAgIBADANBgkqhkiG9w0BAQQFADB8MQswCQYDVQQGEwJhdzEO 190 | MAwGA1UECBMFYXJ1YmExDjAMBgNVBAoTBWFydWJhMQ4wDAYDVQQHEwVhcnViYTEO 191 | MAwGA1UECxMFYXJ1YmExDjAMBgNVBAMTBWFydWJhMR0wGwYJKoZIhvcNAQkBFg5h 192 | cnViYUBhcnViYS5hcjAeFw0xNTExMjAyMjI2MjdaFw0xNjExMTkyMjI2MjdaMHwx 193 | CzAJBgNVBAYTAmF3MQ4wDAYDVQQIEwVhcnViYTEOMAwGA1UEChMFYXJ1YmExDjAM 194 | BgNVBAcTBWFydWJhMQ4wDAYDVQQLEwVhcnViYTEOMAwGA1UEAxMFYXJ1YmExHTAb 195 | BgkqhkiG9w0BCQEWDmFydWJhQGFydWJhLmFyMIGfMA0GCSqGSIb3DQEBAQUAA4GN 196 | ADCBiQKBgQDHtC5gUXxBKpEqZTLkNvFwNGnNIkggNOwOQVNbpO0WVHIivig5L39W 197 | qS9u0hnA+O7MCA/KlrAR4bXaeVVhwfUPYBKIpaaTWFQR5cTR1UFZJL/OF9vAfpOw 198 | znoD66DDCnQVpbCjtDYWX+x6imxn8HCYxhMol6ZnTbSsFW6VZjFMjQIDAQABo4Ha 199 | MIHXMB0GA1UdDgQWBBTx0lDzjH/iOBnOSQaSEWQLx1syGDCBpwYDVR0jBIGfMIGc 200 | gBTx0lDzjH/iOBnOSQaSEWQLx1syGKGBgKR+MHwxCzAJBgNVBAYTAmF3MQ4wDAYD 201 | VQQIEwVhcnViYTEOMAwGA1UEChMFYXJ1YmExDjAMBgNVBAcTBWFydWJhMQ4wDAYD 202 | VQQLEwVhcnViYTEOMAwGA1UEAxMFYXJ1YmExHTAbBgkqhkiG9w0BCQEWDmFydWJh 203 | QGFydWJhLmFyggEAMAwGA1UdEwQFMAMBAf8wDQYJKoZIhvcNAQEEBQADgYEAYvBJ 204 | 0HOZbbHClXmGUjGs+GS+xC1FO/am2suCSYqNB9dyMXfOWiJ1+TLJk+o/YZt8vuxC 205 | KdcZYgl4l/L6PxJ982SRhc83ZW2dkAZI4M0/Ud3oePe84k8jm3A7EvH5wi5hvCkK 206 | RpuRBwn3Ei+jCRouxTbzKPsuCVB+1sNyxMTXzf0= 207 | -----END CERTIFICATE----- 208 | #The secret that an external login server will use to authenticate to the uaa using the id `login` 209 | LOGIN_SECRET: loginsecret 210 | --------------------------------------------------------------------------------