cas-google-authenticator
Skill11k starsChanged yesterdayApache-2.0View on GitHub
Review and change Google Authenticator (GAuth) MFA credential repositories across backends (JPA, Redis, Mongo, DynamoDB, LDAP, JSON, REST, in-memory): owner-scoped deletes, encoding, counts, verification flags, the Redis index, crypto. Use when touching support/cas-server-support-gauth*.
We split this skill into the rules it gives an agent
3 rules. About 0 are common, 0 are distinctive, and 3 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈0
Distinctive · estimate
This author's own choices. Worth a look.
3
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 15
When testing deletes or updates, store devices for two users and two devices per user, and assert the others survive.
- Very specific: line 19
Every repository read returns a decoded copy (JPA detaches before decoding).
- Very specific: line 32
Remove set members by the raw bytes Redis returned (executePipelined(..., RedisSerializer.byteArray()) then sRem), not by re-serializing a …
≈ “Common” is an estimate: at least 1 in 5 of the 308,232 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Google Authenticator MFA repositories
Google Authenticator credential repositories (all backends)
- Review every backend against the same contract, with crypto on:
cas.authn.mfa.gauth.crypto.enableddefaults totrue, but every puppeteer scenario and the repository tests turn it off, so undecoded returns and double encryption never show up in CI. - A device delete must be scoped to its owner. WebAuthn, YubiKey and Duo device managers delete by username and id;
OneTimeTokenCredentialDeviceManagerandGoogleAuthenticatorDeleteAccountActiondelete by id alone, and ids are guessable (JPA sequence;currentTimeMillisbefore 42bcde1). BaseOneTimeTokenCredentialRepository.encode()mutates its argument. Never pass an object you will keep or save again; JPAget(id)and InMemoryget(id)return stored, undecoded instances, and updating them double-encrypts.count()means devices in Redis, JPA, Mongo and DynamoDB, but users in InMemory, JSON and LDAP; check which a caller assumes.- A repository read that fails must not look like "no devices":
OneTimeTokenAccountCheckRegistrationActionsends empty or null results to enrollment (REST returns null, JSON returns empty on errors). - When testing deletes or updates, store devices for two users and two devices per user, and assert the others survive; single-user tests hid the DynamoDB
GEfilter and the LDAP update bug. - To make a range-filter bug visible in a DynamoDB delete test, pick keys that a wrong comparison would sweep up: the kept user's name sorts after the deleted one ("z…" vs "a…"), and the kept device ids are larger than the deleted id. Random UUIDs alone pass by luck half the time.
- DynamoDB tables keyed by
idshould delete withDeleteItemon that key, not a scan followed by deletes. - Webflow actions and device managers that take a device id from the request must load it with the owner-scoped
get(principal.getId(), id)and act only on what that returns. Unscopedget(id)/delete(id)are for the actuator and internal paths. - Every repository read returns a decoded copy (JPA detaches before decoding);
update()must persistproperties, which the verification flags of the delete and confirm actions live in. - The delete/confirm verification flags are stored on the account as
<flag>:<epoch millis>and expire (GoogleAuthenticatorAccountVerificationUtils). They cannot live in flow or conversation scope: the login webflow keeps its execution state client-side, and the AJAX check and the form submit carry different execution keys. CasReentrantLock.tryLock(supplier)returns null when the lock is not acquired; never let that null reach a caller as "no accounts".BaseOneTimeTokenCredentialRepository.encode()returns an encoded copy and leaves its argument alone; store and return the copy, and read normalized values (lowercased username) from it, not from the argument.- Per-tenant ciphers must be built once and reused: a cipher built from settings with blank keys generates its own keys, so a new instance per call cannot decode what the previous one encoded.
BaseOneTimeTokenCredentialRepositorycaches them by tenant and crypto settings. - WebAuthn FIDO metadata:
FidoMetadataDownloader.refreshBlob()always downloads;loadCachedBlob()uses the cache until the BLOB'snextUpdate. CAS refreshes at startup and falls back to the cache onIOException(the FIDO service rate-limits with HTTP 429).CompositeAttestationTrustSourceTestsdownloads from the real service; a 429 there with no cache from an earlier run is an outage, not a regression. - Active Directory keeps a single value of
descriptionon user objects. The LDAP GAuth repository therefore writes all of an entry's accounts as one JSON array value; writing one value per account loses all but one device on AD. - A webflow action that validates a GAuth token and then updates the device must read the device again after validation: the validator updates its own copy (used scratch code, last-used time), and updating an older copy undoes that.
Google Authenticator Redis repository
- Accounts live twice: the record at
CAS_TOKEN_ACCOUNT:<id>and a copy as a member of the setCAS_TOKEN_PRINCIPAL:<username>.get(username),count(username)and OTP validation read the set, not the record, so a delete that removes only the record leaves a device that is still listed and still validates. - Reads must not repair the index. A read that removes set members whose record "does not exist" acts on whatever the read saw; with
read-fromsending reads to replicas, and the record and the set on different cluster slots, a lagging replica makes a live device look orphaned and the removal on the primary is permanent. Repair belongs on the explicitdelete(id): when the record is missing the owner is unknown, so it scansCAS_TOKEN_PRINCIPAL:*in batches and removes members with that id. - Remove set members by the raw bytes Redis returned (
executePipelined(..., RedisSerializer.byteArray())thensRem), not by re-serializing a deserialized account; the value serializer is LZ4 over JDK serialization, and a removal only matches if the bytes are identical. - Spring Data Redis pipelining works on Lettuce cluster connections (
LettuceClusterConnectiondoes not overrideopenPipeline) and keySCANspans all nodes, so pipelines and scans here are cluster-safe.
Trending
Quiet since August.about the whole repository
Who's talking about apereo/cas
- Stack Overflow“What is the relation between CAS vs SAML?”Stack Overflow · Apr 28, 2017 · 23 votes
- strapi/strapi“Add support for login via cas - github.com/apereo/cas”GitHub · Sep 26, 2020 · 8 reactions
- Stack Overflow“Opensaml error receiving correct unmarshaller”Stack Overflow · Apr 10, 2017 · 6 votes
- Stack Overflow“How to enable file-based authentication in CAS 5”Stack Overflow · Apr 14, 2017 · 5 votes
- google/error-prone“ErrorProne 2.37: StringConcatToTextBlock causes java.util.NoSuchElementException”GitHub · Mar 19, 2025 · 3 reactions
The biggest 5 of 27 mentions linking to the repository that our crawl found. Each line is their own headline.
See all 27
Talked about on Stack Overflow, GitHub, Hacker News and the web (27 times).
On Stack Overflow · 14
- Apr 28, 2017What is the relation between CAS vs SAML?23 votes
- Apr 10, 2017Opensaml error receiving correct unmarshaller6 votes
- Apr 14, 2017How to enable file-based authentication in CAS 55 votes
- Aug 2, 2021How to create a SAML IDP that authenticates with an API from scratch2 votes
- Feb 3, 2020CAS 6.1 - State Parameter null with Pac4J2 votes
9 more on Stack Overflow
- Jul 4, 2017CAS Spnego - KrbException: Checksum failed2 votes · 3 answers
- Dec 11, 2023What happened "org.apereo.cas.web.security" in 7.0.0-RC9 of org.apereo.cas?1 vote
- Jul 23, 2020Cas - configure Principal transformation1 vote · 1 answer
- Nov 25, 2019CAS Disable Service X-Frame-Options not work1 vote
- Apr 24, 2019inject model data into spring webflow in cas1 vote
- Mar 4, 2019Prevent CAS authentication if X.509 user isn't registered1 vote
- Nov 10, 2021CAS Apereo 6.1.x importing PasswordEncoderUtils0 votes · 1 answer
- Aug 2, 2021How to SSO to a directory server from a python application0 votes
- Nov 7, 2016using CAS with with custom login page0 votes
On GitHub · 9
- Sep 26, 2020Add support for login via cas - github.com/apereo/cas — strapi/strapi8 reactions · 21 comments
- Mar 19, 2025ErrorProne 2.37: StringConcatToTextBlock causes java.util.NoSuchElementException — google/error-prone3 reactions · 3 comments
- Mar 26, 2020Renovate crash: JavaScript heap out of memory (many Gradle dependencies) — renovatebot/renovate1 reaction · 8 comments
- Aug 10, 2026Add Apereo CAS project to regression testing project lists — checkstyle/test-configssays it tested it0 reactions · 1 comment
- Jul 17, 2026[Argus] CVE-2026-59099: Apereo CAS 7.3.0 < 8.0.0-RC6 - AES-GCM 논스(Nonce) 재사용으로 인한 정보 노출 — LEEKIYOON-SEC/Argus-DEV0 reactions
4 more on GitHub
- Dec 5, 2024Extract Attr within moved file — pouryafard75/RM-ASTDiff0 reactions · 14 comments
- Jan 18, 2023Authentication/Authorization: We need a API-friendly strategy — wolpert/svarm0 reactions · 1 comment
- Apr 19, 2020COMPARAISON KEYCLOAK / CAS — pegasus-io/belenios-containers0 reactions
- Mar 20, 2018apereo/cas OAuth endpoints need @Controller annotations — easy-software-ufal/annotations_repos0 reactions
On Hacker News · 3
- Feb 20, 2017Enterprise Single Sign on for all3 points
- Aug 8, 2023The Central Authentication Service Project2 points
- Oct 16, 2016Apereo CAS: Single Sign-On for the Web1 point
On the web · 1
- Apr 11, 2025apereo/cas - Where software is built — google.com
In this repository30 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- .github/copilot-instructions.mdCopilot instructions
- cas-actuatorsSkill
- cas-attribute-consentSkill
- cas-build-ciSkill
- cas-docs-siteSkill
- cas-groovy-scriptingSkill
- cas-handoffSkill
- cas-heimdall-authzenSkill
- cas-import-prSkill
- cas-interrupt-notificationsSkill
- cas-ldapSkill
- cas-mcp-serverSkill
- cas-oauth-oidc-authenticationSkill
- cas-oauth-oidcSkill
- cas-oid4vcSkill
- cas-passwordless-webauthnSkill
- cas-protocolSkill
- cas-puppeteer-scenariosSkill
- cas-samlSkill
- cas-sandbox-verificationSkill
- cas-service-registriesSkill
- cas-session-storesSkill
- cas-startup-performanceSkill
- cas-storage-backendsSkill
- cas-testingSkill
- cas-ticket-registriesSkill
- cas-uiSkill
- cas-web-securitySkill
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

