Skip to content

Commit

Permalink
feat: additional ca cert chain var (#14)
Browse files Browse the repository at this point in the history
docs: add notes about ac and disconnected environments
feat: add additional expose template
  • Loading branch information
anthonywendt committed Jun 10, 2024
1 parent 26d4c99 commit a03ba4c
Show file tree
Hide file tree
Showing 7 changed files with 27 additions and 3 deletions.
16 changes: 15 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,18 @@ Bigbang [Nexus Repository Manager](https://repo1.dso.mil/big-bang/product/packag
#### NEXUS_VM_PARAMS
- This package provides the same default as the upstream registry1 chart. You may need to update these to your needs.

`-Dcom.redhat.fips=false -Xms2703M -Xmx2703M -XX:MaxDirectMemorySize=2703M -XX:+UnlockExperimentalVMOptions -XX:+UseContainerSupport -Djava.util.prefs.userRoot=/nexus-data/javaprefs`
`-Dcom.redhat.fips=false -Xms2703M -Xmx2703M -XX:MaxDirectMemorySize=2703M -XX:+UnlockExperimentalVMOptions -XX:+UseContainerSupport -Djava.util.prefs.userRoot=/nexus-data/javaprefs`

#### Additional Notes
##### Access Control
- Information about configuring access controls and related topics such as realms, privileges, roles, default roles, ect can be found [here](https://help.sonatype.com/en/access-control.html#related-topics)

- To assign a Default Role to an authenticated user follow these steps.
- Ensure the Default Role Realm is Active
![active-realms](docs/images/active-realms.png)
- Create a Capability using the capability type *Default Role* and the role you would like to use for authenticated users
![default-role-capability](docs/images/default-role-capability.png)

##### Disconnected Environments
- When deploying in a disconnected environment, you will want to disable the outreach management capability.
![outreach-settings](docs/images/outreach-management-settings.png)
5 changes: 4 additions & 1 deletion chart/templates/uds-package.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,14 @@ spec:
network:
expose:
- service: nexus-nexus-repository-manager
podLabels:
selector:
app: nexus-repository-manager
gateway: tenant
host: nexus
port: 8081
{{ if .Values.additionalNetworkExposures }}
{{- toYaml .Values.additionalNetworkExposures | nindent 6 }}
{{- end }}
allow:
- direction: Ingress
remoteGenerated: IntraNamespace
Expand Down
1 change: 1 addition & 0 deletions chart/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@ sso:
# Replace with https://nexus to match what nexus is using once UDS bug is fixed.
# This package replaces this automatically on deployment
clientId: replace-me-with-nexus-entity-uri
additionalNetworkExposures: []
Binary file added docs/images/active-realms.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/default-role-capability.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/outreach-management-settings.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 7 additions & 1 deletion zarf.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ variables:
default: "-Dcom.redhat.fips=false -Xms2703M -Xmx2703M -XX:MaxDirectMemorySize=2703M -XX:+UnlockExperimentalVMOptions -XX:+UseContainerSupport -Djava.util.prefs.userRoot=/nexus-data/javaprefs"
- name: NEXUS_SECURITY_RANDOMPASSWORD
default: "true"
- name: ADDITIONAL_CA_CHAIN

components:
- name: keycloak-idp-metadata
Expand All @@ -54,7 +55,12 @@ components:
before:
- cmd: |
if [ "${ZARF_VAR_NEXUS_SSO_ENABLED}" = "true" ]; then
curl https://sso.${ZARF_VAR_DOMAIN}/realms/uds/protocol/saml/descriptor
if [ -z "${ZARF_VAR_ADDITIONAL_CA_CHAIN}" ]; then
curl https://sso.${ZARF_VAR_DOMAIN}/realms/uds/protocol/saml/descriptor
else
echo "${ZARF_VAR_ADDITIONAL_CA_CHAIN}" | base64 --decode > /tmp/ca_cert.crt
curl --cacert /tmp/ca_cert.crt https://sso.${ZARF_VAR_DOMAIN}/realms/uds/protocol/saml/descriptor
fi
fi
mute: true
setVariables:
Expand Down

0 comments on commit a03ba4c

Please sign in to comment.