Talk track · one speaker · 5 minutes · audience: Apple IS&T

One push, followed from the developer to the server

Two slides, for an enterprise IT audience: they run internal platforms, care about access, secrets, change control and recovery. The story follows one real commit: lions-uw-service, ee3e3a3, 19 November.

5:00total
~460spoken words, ~3.5 min, the rest is pauses and pointing
2slides

0:00Open on the push

Slide 1

On the 19th of November, a developer at Asuransi Simas Jiwa, an Indonesian life insurer, pushed one commit to their underwriting service. Six minutes forty-one later it was built, tested, scanned for secrets and running on their staging environment, with its build id verified. Nobody had a shell on a server.

Point at the Jenkins build, lower right.

0:30Before

Before, a release was an engineer SSH-ing into the host with a personal sudo account and running a shell script. The script ran docker stack rm and then stack deploy, so every release was an outage. No tests in the path, no health check, no rollback, and no record of who deployed what.

Credentials were in the repos. Gitleaks over the history of 11 repositories flagged 652 possible secrets.

Point at the terminal, then the 652.

1:30After

Today eight services deploy to staging on every push, and sixteen have a pipeline. A failed health check rolls the service back automatically within five minutes, while the old task is still serving. Every deploy writes a record: commit, image digest, who started it, the outcome.

2:00The pipeline

Slide 2

The code lives in GitHub and Google Cloud Source; everything else is on ASJ's own VMs. GitHub can't reach their network, so Jenkins polls every five minutes, and a mirror on the controller pulls Cloud Source. One shared pipeline library, asj-core, serves all sixteen services, so a service's Jenkinsfile is a few lines of config. It runs gitleaks, the tests, builds one image and pushes it by digest to a private registry. The image that passed the tests is the image that ships.

Build and deploy run on separate agents. The build agent never holds a deploy key.

Trace the top row left to right.

3:00The deploy gate

This is the part we'd defend in a review. The staging hosts belong to another team, so Jenkins never gets a shell. Its SSH key is pinned in authorized_keys to a forced command and to one source address. That command is a small root-owned script, allowed by one sudoers line, and it can only update the services listed in its profiles.

It does a start-first Swarm update with a health check, then we compare the build id the service reports with the commit. If either fails, Swarm rolls back.

Point at "Why a gate?".

3:50Secrets and operations

Secrets moved to OpenBao. Each job logs in with its own AppRole, bound to its host's address, gets a short-lived token, reads only its paths and revokes it. Admins can't read application secrets at all. The whole platform is Ansible and Jenkins Configuration as Code, applied from a Jenkins job, so a change goes through a pull request and CI first: 539 tests on the platform itself.

4:30Close

What we'd do again: automate the riskiest manual step first, the deploy, not the build. Give the automation the smallest key you can. Make the safe path the easy path, so developers just push. Thank you.

Q&AQuestions IS&T will ask

Who can deploy to production?
Pushing a release tag is the approval; only people who can tag can release. A named Jenkins user then picks the tag and a time window. Host, window and dry-run or live are in OpenBao, not in the job.
What if Jenkins is compromised?
The attacker gets the gate's verbs: update a listed service to an image, or roll it back. No shell, no other service, no host config, and only from the deploy agent's address.
How do you rotate secrets?
Change the value in OpenBao; the next run reads it. KV v2 keeps 10 versions, so a bad change is one rollback. Rotating the 652 historical findings is ASJ's job; we handed over the list.
Audit?
OpenBao audit log, a JSON deploy record per attempt in the release store, and the gate logs every call to syslog.
Backup and recovery?
OpenBao snapshots nightly, newest 7 kept. Jenkins is rebuilt from code, but build history is not backed up yet. We lost history once when a folder was deleted, and recovered the pipelines in minutes from config. Off-host backup is open in the handover.
Why not Kubernetes or a managed CI?
ASJ runs Docker Swarm on its own VMs and the hosts can't reach out freely. We fitted their platform rather than replacing it.
What went wrong?
The underwriting service's staging deploys have failed since 17 November because the app itself doesn't start. Every time, the gate rolled it back and staging kept running. That's the design doing its job.

BeforeRehearse