Repository navigation
CLO-121 -- A service declares how it authenticates in one door, Authentication - #987
Merged
czpython merged 1 commit intoOct 25, 2026
Conversation
|
Preview deployment for your docs. Learn more about Mintlify Previews.
💡 Tip: Enable Automations to automatically generate PRs for you. |
czpython
force-pushed
the
paulo/clo-121-druks-one-credential-type-per-service-replaces-the
branch
from
October 24, 2026 19:41
6d601e9 to
8bfa5a6
Compare
czpython
force-pushed
the
paulo/clo-121-druks-one-credential-type-per-service-replaces-the
branch
from
October 24, 2026 19:42
8bfa5a6 to
4530d77
Compare
czpython
force-pushed
the
paulo/clo-121-druks-one-credential-type-per-service-replaces-the
branch
from
October 24, 2026 20:53
4530d77 to
7917676
Compare
czpython
force-pushed
the
paulo/clo-121-druks-one-credential-type-per-service-replaces-the
branch
from
October 24, 2026 20:58
7917676 to
aa3c5b6
Compare
czpython
force-pushed
the
paulo/clo-121-druks-one-credential-type-per-service-replaces-the
branch
from
October 24, 2026 20:59
aa3c5b6 to
9151610
Compare
czpython
force-pushed
the
paulo/clo-121-druks-one-credential-type-per-service-replaces-the
branch
from
October 24, 2026 21:06
9151610 to
f7fff0b
Compare
czpython
force-pushed
the
paulo/clo-121-druks-one-credential-type-per-service-replaces-the
branch
from
October 24, 2026 21:09
f7fff0b to
b527d5a
Compare
czpython
force-pushed
the
paulo/clo-121-druks-one-credential-type-per-service-replaces-the
branch
from
October 25, 2026 12:37
b527d5a to
034ed72
Compare
czpython
force-pushed
the
paulo/clo-121-druks-one-credential-type-per-service-replaces-the
branch
from
October 25, 2026 15:47
034ed72 to
89eee3f
Compare
czpython
force-pushed
the
paulo/clo-121-druks-one-credential-type-per-service-replaces-the
branch
from
October 25, 2026 15:50
89eee3f to
4f2ce30
Compare
czpython
force-pushed
the
paulo/clo-121-druks-one-credential-type-per-service-replaces-the
branch
from
October 25, 2026 16:22
4f2ce30 to
aa1793c
Compare
czpython
force-pushed
the
paulo/clo-121-druks-one-credential-type-per-service-replaces-the
branch
from
October 25, 2026 16:45
aa1793c to
4dec095
Compare
czpython
deleted the
paulo/clo-121-druks-one-credential-type-per-service-replaces-the
branch
October 25, 2026 16:50
This branch was successfully deployed
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.
Closes CLO-121.
What changed
A service declares how it authenticates in one nested class,
Authentication, found by name asSettingsis. It names the service's ways as instances of the kinds indruks.services.auth, under fixed names, and carries what the provider does differently as classmethods.api_key = auth.ApiKey(): a pasted key. Ownsapi_key. Linear, Jira, Twilio, WAHA, Voice, Speech to text.jwt = auth.Jwt(): an app's private key. Ownsprivate_key. GitHub.oauth = auth.Oauth(...): the service's own OAuth app. Druks installs it and acts with the grant. Ownsclient_idandclient_secret; takes the endpoints, the identity facts, andinstall_params. Slack, Linear.sign_in = auth.SignIn(...): an OAuth client people only sign in through, with no install and no grant. Ownsclient_idandclient_secret. GitHub.Settingsholds the rest: Jira'semail, Twilio'saccount_sid, GitHub'sapp_id, the webhook secrets. NoSettingsfield has a blank default. The card showsSettingsfirst, then the kinds in the orderapi_key,jwt,oauth,sign_in. One row stores them all.api_key,jwt, andoauthare how Druks acts as the service, and a service holds one at a time: with two declared, each is pasted whole or left out; a pasted key ends the installed app's grant, and an install clears the key.sign_instands apart. A service declaresoauthorsign_in, not both. Another attribute holding a kind, or a kind under the wrong name, fails at import.oauthorsign_in, when it namesidentity_key. GitHub'ssign_indoes; the reviewer inherits the sameAuthenticationwithout it and writes nothing.Authentication, with defaults on the base:get_authorization,get_identity,get_consent_query,read_grant,is_grant_revoked,get_install_endpoint,complete_install, andissue_token. GitHub mints its per-repo installation token there; Slack readsauthed_userthere.b7d2e4a9c1f3).Service.get_grant()andget_access_token()read it. Slack's bot token lives there.request_oauth_on_install, and the door starts at GitHub's installations page.GithubAppis the abstract GitHub App thatGithubandGithubReviewerextend.is_managed()stays at the manager seams: the OAuth client, the configuration sync, resources, and webhooks.actor_token_name,get_install_params, Slack's pasted bot token and itsverify, Linear's and Slack's install overrides.api_key, anddruks-callsreads it so.