Quick revision
The short answer
For most settings, a platform starter should provide good defaults with clear override points, because hard enforcement in code leads teams to work around or fork the starter. Only settings that are mandatory for compliance should be enforced, and they should be enforced by checks outside the code as well, such as CI rules, admission policies and runtime audits. Overrides should be visible, for example logged or reported, and reviewed regularly so the defaults keep improving.
What to remember
In this answer, we saw that a platform starter should provide defaults with override points for most settings, because hard enforcement in code pushes teams to fork and stops fixes reaching them. Only settings required for compliance should be enforced, and they are enforced most reliably outside the code, with CI rules, admission policies and runtime audits. Making overrides visible and reviewing them regularly turns them into data for improving the defaults.
Your turn
Answer it aloud as you would in the interview, or type your answer below. Then show one part at a time and compare.
For most settings, a platform starter should provide good defaults with clear override points, because hard enforcement in code leads teams to work around or fork the starter. Only settings that are mandatory for compliance should be enforced, and they should be enforced by checks outside the code as well, such as CI rules, admission policies and runtime audits. Overrides should be visible, for example logged or reported, and reviewed regularly so the defaults keep improving.
Why this question is asked
Every platform team meets this question sooner or later. Security wants TLS and audit logging everywhere, and the platform starter seems like the perfect place to lock them in. But a starter that fights the teams using it gets copied, patched or dropped. Interviewers ask this to hear how we balance safety and autonomy with a reasoned rule rather than a preference. In this answer, we will see what goes wrong at both extremes, build a way to decide per setting, look at how to enforce the few mandatory ones, and how to make overrides visible and useful.
1What Goes Wrong at Each Extreme
Imagine the starter locks the log format, the TLS settings, the actuator exposure and the CORS policy, with no way to change them. For a while it looks tidy. Then a team needs a different CORS rule for a partner integration, cannot change it, and copies the starter into its own repository with one line changed. Now that team stops receiving security fixes, and the platform has lost the very control it wanted. Spring code is also flexible enough that a determined team can override almost anything with a bean or a property, so a lock in code is weaker than it looks.
The other extreme is a starter that only offers defaults and accepts any override silently. Teams turn off audit logging to fix a noisy test, the change reaches production, and nobody notices until an auditor asks for logs. So neither pure defaults nor pure enforcement works. We need a rule for deciding which settings belong where.
2Deciding Setting by Setting
The decision is per setting, not per starter. For each one, we ask a few questions in order: is this required by a law, a contract or a security policy we must prove to someone? If not, it is a default. If yes, can the requirement be checked from outside the code, for example in the build or the cluster? If so, it should be checked there too.
- Is it required for compliance?YesMandatory: go onNoDefault with an override point
- Can it be checked outside the code?YesEnforce with CI, admission or auditNoEnforce in code and test it
- Make deviations visiblelog or report non-default values
- Review overrides each quarterimprove the defaults
4 steps in order. Play them, or step through them one at a time.
3Why Defaults With Override Points Fit Most Settings
Most settings in a starter are about convenience and good practice: timeouts, pool sizes, JSON format, log levels, actuator endpoints. The platform knows a good value for the typical service, but not for every service. A 2 second HTTP timeout is right for most calls and wrong for a report service that calls a slow legacy system. In Spring this is easy to support: every bean is @ConditionalOnMissingBean and every value is a property, so teams change exactly what they need and keep the rest of the starter.
The benefit is that teams stay on the starter. They keep receiving fixes and upgrades, because overriding one property does not require forking anything. The platform keeps its reach, which is worth far more than control over one value.
4Enforcing the Few Mandatory Settings
For the mandatory settings, such as TLS for external traffic, audit logging of access to personal data, or keeping the env and heapdump actuator endpoints closed, the starter still applies them by default. But the real enforcement happens where code cannot bypass it. A CI rule fails the build if application.yml exposes forbidden endpoints. A Kubernetes admission policy, for example with Kyverno or OPA Gatekeeper, refuses pods without the required sidecar or with privileged settings. A runtime audit regularly queries services and checks what they actually do.
Notice that checks outside the code are honest about what they prove. A rule inside the starter can be overridden by a clever bean; an admission policy in the cluster cannot. And when a check fails, it explains why the setting is mandatory, which is what turns enforcement into something teams accept.
5Making Overrides Visible and Learning From Them
Overrides are not failures; they are information. The starter can compare its bound properties with its defaults at startup and log one line listing the non-default values, and publish the same list on the info endpoint or as a metric tag. The platform team can then see, across 200 services, which defaults teams change most.
If 40 services raise the same timeout, the default is probably wrong, and we change it. If one service turned off audit logging, we talk to that team. Reviewing the list each quarter keeps the starter in step with how it is really used, and it is the practical answer to the question of who decides: the platform sets the defaults, and the data from overrides tells it when to change them.
6Follow-up questions
What if security insists that everything in the starter be locked?
I would ask which requirements they need to prove, and to whom. Those become mandatory settings, checked in CI, the cluster and audits, which is stronger proof than a lock in code. For the rest, I would show that locked starters get forked and stop receiving security fixes, which is worse for security.
How do you stop teams turning off a mandatory setting with a property?
The starter can refuse to start when a mandatory property is set to a forbidden value, with a clear failure message. But the build and cluster checks are the real guarantee, because code-level checks can be bypassed by a custom bean.
Who owns the decision when a team needs an exception to a mandatory setting?
The control owner, usually security or compliance, with the platform team advising. Exceptions are written down with an expiry date and visible in the same override report, so they are reviewed instead of forgotten.
7Conclusion
In this answer, we saw that a platform starter should provide defaults with override points for most settings, because hard enforcement in code pushes teams to fork and stops fixes reaching them. Only settings required for compliance should be enforced, and they are enforced most reliably outside the code, with CI rules, admission policies and runtime audits. Making overrides visible and reviewing them regularly turns them into data for improving the defaults.
Open with
My default answer is defaults, not enforcement, and I decide per setting. For most things a starter configures, like timeouts, pool sizes, JSON format and log levels, the platform knows a good value for a typical service but not for every one, so every bean is overridable and every value is a property.
Then, if they want more
If we lock those, teams with a real need copy the starter, change one line and stop getting our security fixes, which is the opposite of what we wanted.
For the few settings that are mandatory for compliance, like TLS, audit logging or keeping sensitive actuator endpoints closed, the starter applies them by default, but I would enforce them where code cannot get around it: a CI rule that fails the build, an admission policy in the cluster, and a runtime audit. Those also give us proof for auditors.
Then I would make overrides visible: the starter logs and reports its non-default settings, and every quarter we look across services. If forty services raise the same timeout, the default is wrong and we change it. If one team disabled audit logging, we talk to them.
About this answer
- Last updated
- 12 November 2026
- Checked
- Its structure and format are checked automatically. Use it as a carefully prepared study note: where a detail matters, confirm it against the documentation below. What the checks cover
- Where the question comes from
- Written by Scrivio for practice. It is not taken from an interview.
- Official documentation
- Spring Boot reference
Report an issue with this answer
Copy the line below and send it to the author with what you found. It carries the address of this page.
Issue with "Should an internal platform starter enforce security and logging settings that teams...": https://scrivio-interview-library.netlify.app/spring-boot/auto-configuration/6a5d65a515/