SubjectConfirmation Method is read but never checked
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 72/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Quiet
- Tech stack
- lua
- Domain
- authentication, security
Research direction
Start in lua/resty/saml.lua by tracing saml.doc_assertions into confirmation_ok and reading how SubjectConfirmation methods are currently handled. Confirm that only bearer confirmations are satisfiable, while holder-of-key and sender-vouches are refused; the unused method field may alternatively be removed as described.
Written by the indexing model from the issue text.
Description
What
saml.doc_assertions reports method for every SubjectConfirmation it reads, and confirmation_ok in lua/resty/saml.lua never looks at it. Every method is treated as satisfiable once the Recipient and the time window hold.
Why it matters
The method states how the presenter is meant to prove they are the subject. urn:oasis:names:tc:SAML:2.0:cm:bearer asks for nothing beyond presentation, and it is the one this callback implements. holder-of-key asks for proof of a key and sender-vouches rests on an attesting party, and nothing here performs either. Accepting them claims work that never happened.
The practical impact is small for the deployments this library serves. An IdP configured for browser SSO issues bearer assertions only, and AudienceRestriction already refuses an assertion minted for whatever other service a holder-of-key flow serves.
It sits above zero because a holder-of-key assertion is built to be safe to leak: its security rests on the recipient checking the key, so it circulates with far less care than a bearer one. One reaching this callback under a matching audience is accepted today as though it were bearer.
Fix
Count a confirmation as satisfiable only when its Method is bearer. There is nothing extra to verify, since bearer means presentation is the proof, so the change only refuses the methods this code cannot honour. The alternative is dropping method from the reader, so that no unused field dangles for the next person auditing this.
Noticed on #42, which added the field. Left out of that PR to keep it to the scope of #37.
- Dominant language
- Perl
- Stars
- 2
- Forks
- 3
- Avg merge
- 2d 20h
- Merged PRs (30d)
- 3
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from api7/lua-resty-saml
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
api7/lua-resty-saml#63 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
api7/lua-resty-saml#62 ·
-
Difficulty 3/5 1-2 days Newbie friendliness 68/100
api7/lua-resty-saml#64 ·
-
api7/lua-resty-saml#61 · 1 assignee ·
-
Difficulty 4/5 3-5 days Newbie friendliness 48/100
api7/lua-resty-saml#59 ·
All issues in api7/lua-resty-saml
Similar issues
-
Difficulty 1/5 Under an hour Newbie friendliness 68/100
-
Difficulty 1/5 Under an hour Newbie friendliness 82/100
-
Difficulty 1/5 Under an hour Newbie friendliness 72/100
-
Difficulty 1/5 Under an hour Newbie friendliness 60/100
conda-forge/perl-test-warn-feedstock#1 · 1 comment · 1 reaction ·
-
Difficulty 1/5 Under an hour Newbie friendliness 68/100
conda-forge/perl-test-fatal-feedstock#6 · 1 comment · 1 reaction ·