Skip to content

improve startup scripts and logs take 2#1250

Closed
fhanik wants to merge 4 commits into
cloudfoundry:developfrom
fhanik:pr/improve-startup-scripts-and-logs-take-2
Closed

improve startup scripts and logs take 2#1250
fhanik wants to merge 4 commits into
cloudfoundry:developfrom
fhanik:pr/improve-startup-scripts-and-logs-take-2

Conversation

@fhanik

@fhanik fhanik commented Jun 12, 2026

Copy link
Copy Markdown
Contributor

Override PR #1236 as no checks were run

Changes span the pre-start script, log4j2 redaction pattern, redirect URI matching default, and release tooling.

 

Redirect URI matching (BREAKING CHANGE)

uaa.client.redirect_uri.matching_mode now defaults to exact rather than legacy. Deployments with clients that use subdomain or path wildcard redirect URIs must register exact URIs or explicitly set matching_mode: legacy in their manifest before upgrading.

 

Logging defaults

uaa.logging_level now defaults to INFO. The log4j2 redaction pattern is extended to cover code=, access_token=, refresh_token=, and id_token= values in addition to password= and client_secret=.

 

cert-cache file ownership

pre-start now calls resecure_cert_cache() after configure_tomcat and configure_spring_boot, restoring cert-cache to root:root 0711 and its contents to root:root 0644. The vcap process retains read-only access to the truststore.

 

Release script temp file handling

perform-release.sh now uses mktemp for all temporary files and directories, with mode 0600 on credential-bearing files and trap ... EXIT for cleanup.

fhanik added 4 commits June 12, 2026 13:24
Replace fixed /tmp paths with mktemp-allocated files and directories.
The private.yml copy is created with mode 0600 and registered with
trap ... EXIT for automatic cleanup. SAVEDIR is also allocated with
mktemp -d instead of a fixed path.
Switch uaa.client.redirect_uri.matching_mode default from legacy to
exact, aligning with RFC 6749 and current best practice for OAuth2
redirect URI validation.

BREAKING CHANGE: clients relying on subdomain or path wildcard matching
must register exact redirect URIs or explicitly set
uaa.client.redirect_uri.matching_mode: legacy in their manifest before
upgrading.
Change uaa.logging_level default from DEBUG to INFO. The DEBUG level
produces verbose Spring Security and JDBC output that is not appropriate
for production deployments.

Extend the log4j2 redaction pattern to cover code=, access_token=,
refresh_token=, and id_token= in addition to the existing password=
and client_secret= patterns.
configure_tomcat transfers ownership of /var/vcap/data/uaa/ to vcap,
which includes cert-cache and the Java truststore within it.

Add resecure_cert_cache() to run after configure_tomcat and
configure_spring_boot. It restores cert-cache to root:root with mode
0711 and all enclosed files to root:root 0644, so the vcap process
retains read access to the truststore without write access.
@fhanik fhanik closed this Jun 12, 2026
@fhanik fhanik deleted the pr/improve-startup-scripts-and-logs-take-2 branch June 12, 2026 21:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant