Repository navigation
feat(slack-bot): TLS + OIDC client_credentials for remote deployments - #1054
Merged
Merged
Conversation
kantord
force-pushed
the
slack-bot-staging-deploy
branch
2 times, most recently
from
September 3, 2026 17:01
97fe674 to
4eb51d9
Compare
Lets the Slack bot example point at a real deployed backend (e.g. the shared staging mecak8s) instead of only a local/Compose mecated. MECATL_GRPC_TLS=true switches the target to https:// and mints a bearer via OAuth2 client_credentials (src/m2mToken.ts), cached and refreshed per call through the SDK's existing credentialProvider hook. Also publishes the bot as a signed, attested container image (ghcr.io/stacklok/mecatl/slack-bot) from the same v* release tag as mecated/mecatui/mecak8s, reusing the existing docker/bot.Dockerfile. Co-authored-by: Claude Sonnet 5 <[email protected]>
Leftover from rebasing onto #996 (server-owned session placement) - this paragraph should have been fixed in the same commit that dropped the workspace concept elsewhere in this file, but the edit never got staged. Co-authored-by: Claude Sonnet 5 <[email protected]>
Not switching node:24-slim to a hardened base now - it would need a multi-stage rewrite (corepack/pnpm/build currently run inside the final image, which a minimal hardened runtime almost certainly can't do). Records why Chainguard would be favored over Docker Hardened Images when this gets picked up: no new vendor relationship (mecatl already builds mecated/mecak8s/mecatui on cgr.dev/chainguard/static), no new CI credential, versus DHI's free tier still requiring a dhi.io registry login. Co-authored-by: Claude Sonnet 5 <[email protected]>
kantord
force-pushed
the
slack-bot-staging-deploy
branch
from
September 4, 2026 10:07
9b098f8 to
be48950
Compare
samuv
approved these changes
Sep 4, 2026
This was referenced Sep 11, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
sdk/typescript/examples/slack-bot) point at a real deployed backend instead of only a local/Composemecated.MECATL_GRPC_TLS=trueswitches the target tohttps://and mints a bearer via OAuth2 client_credentials (newsrc/m2mToken.ts), cached and refreshed through the SDK's existingcredentialProviderhook — no SDK change needed.ghcr.io/stacklok/mecatl/slack-bot) from the samev*release tag asmecated/mecatui/mecak8s, reusing the existingdocker/bot.Dockerfile(its "local dev only" framing is softened since it's now also the release artifact).stacklok/infraPR wires this up as a real staging2 deployment talking to the sharedmecak8s.This is Fully or partially written by an AI agent.
Follow-up considered: hardened base image
Raised in review (h/t Samuele): should the released image use a hardened base instead of
node:24-slim? Yes, worth doing, deferred deliberately rather than done here — full reasoning is now a comment above theFROMline indocker/bot.Dockerfile. Short version:FROMswap. The build currently runscorepack/pnpm install/pnpm run buildinside the final image. A hardened runtime tag (minimal/distroless-style) almost certainly can't do that — this needs a proper multi-stage rewrite: a-dev/full builder stage producesdist/+ a prunednode_modules, a minimal runtime stageCOPYs just those in and runsnode dist/index.jsdirectly.cgr.dev/chainguard/nodeis free with no registry login, and this repo already depends on that vendor for every other released image (mecated/mecak8s/mecatuibuild oncgr.dev/chainguard/static, see.ko.yaml) — zero new vendor relationship, zero new CI credentials. Docker Hardened Images is also genuinely free (Apache 2.0, unpaywalled catalog), but pulling fromdhi.iorequiresdocker login dhi.ioeven on the free tier — a new credential this repo's CI doesn't currently have.latest/latest-devare pullable for free; a specific pinned version tag needs a Chainguard sales conversation. Workaround already precedented in.ko.yaml: pin the digest oflatestat build time, not the moving tag.Not blocking this PR. Tracked as a real follow-up, not a "later, maybe."
Test plan
task slack-bot:lint/task slack-bot:typecheck/task slack-bot:testall pass, including newtest/env.test.tscoverage for the TLS/M2M branch and its fail-fast-on-missing-var behaviordocker build -f examples/slack-bot/docker/bot.Dockerfile .(contextsdk/typescript/) succeeds.github/workflows/release.yml's newpublish-slack-botjob: YAML-validated and its sibling jobs' full CI run is green on this branch (two unrelated flaky Go race tests hit on the way, confirmed as flakes via rerun — not caused by this change)mecak8sonce the infra-side Okta app + deployment land🤖 Generated with Claude Code