8000 fix: improve GitHub auth error message for security requirements by erka · Pull Request #5331 · flipt-io/flipt · GitHub
[go: up one dir, main page]

Skip to content

fix: improve GitHub auth error message for security requirements#5331

Merged
markphelps merged 2 commits intov2from
rd/v2/github-auth-restricted
Jan 30, 2026
Merged

fix: improve GitHub auth error message for security requirements#5331
markphelps merged 2 commits intov2from
rd/v2/github-auth-restricted

Conversation

@erka
Copy link
Contributor
@erka erka commented Jan 29, 2026

Replace generic "request was not authenticated" error message with more
specific "account does not satisfy the security requirements" when users
fail to meet organization/team restrictions in GitHub authentication.

Replace generic "request was not authenticated" error message with more
specific "account does not satisfy the security requirements" when users
fail to meet organization/team restrictions in GitHub authentication.

Signed-off-by: Roman Dmytrenko <rdmytrenko@gmail.com>
@erka erka requested a review from a team as a code owner January 29, 2026 19:11
@dosubot dosubot bot added the size:XS This PR changes 0-9 lines, ignoring generated files. label Jan 29, 2026
@dosubot
Copy link
dosubot bot commented Jan 29, 2026

Related Documentation

Checked 2 published document(s) in 0 knowledge base(s). No updates required.

How did I do? Any feedback?  Join Discord

@codecov
Copy link
codecov bot commented Jan 29, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 60.54%. Comparing base (b6f833c) to head (633a621).
⚠️ Report is 1 commits behind head on v2.

Additional details and impacted files
@@            Coverage Diff             @@
##               v2    #5331      +/-   ##
==========================================
+ Coverage   60.53%   60.54%   +0.01%     
==========================================
  Files         138      138              
  Lines       13505    13509       +4     
==========================================
+ Hits         8175     8179       +4     
  Misses       4641     4641              
  Partials      689      689              
Flag Coverage Δ
integrationtests 34.66% <0.00%> (+0.09%) ⬆️
unittests 51.83% <100.00%> (+0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

}

return errors.ErrUnauthenticatedf("request was not authenticated")
return errors.ErrUnauthenticatedf("account does not satisfy the security requirements")
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

im wondering if we should be more specific and return an error for:

  1. if they arent in the specified organizations list (dont name the orgs though)
  2. if they arent in the specified teams if they are in the org (same, no names)

i think this would be most helpful without leaking anything ? wdyt?

Signed-off-by: Roman Dmytrenko <rdmytrenko@gmail.com>
@dosubot dosubot bot added size:S This PR changes 10-29 lines, ignoring generated files. and removed size:XS This PR changes 0-9 lines, ignoring generated files. labels Jan 29, 2026
Copy link
Collaborator
@markphelps markphelps left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ty!

@markphelps markphelps merged commit d1704d4 into v2 Jan 30, 2026
30 checks passed
@markphelps markphelps deleted the rd/v2/github-auth-restricted branch January 30, 2026 14:12
@erka erka added the v2 Flipt v2 label Jan 30, 2026
erka added a commit that referenced this pull request Feb 4, 2026
* fix: improve GitHub auth error message for security requirements

Replace generic "request was not authenticated" error message with more
specific "account does not satisfy the security requirements" when users
fail to meet organization/team restrictions in GitHub authentication.

Signed-off-by: Roman Dmytrenko <rdmytrenko@gmail.com>

* address PR feedback

Signed-off-by: Roman Dmytrenko <rdmytrenko@gmail.com>

---------

Signed-off-by: Roman Dmytrenko <rdmytrenko@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:S This PR changes 10-29 lines, ignoring generated files. v2 Flipt v2

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

0