You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@dubbo.apache.org by "Skylm808 (via GitHub)" <gi...@apache.org> on 2026/03/14 09:42:08 UTC
[PR] feat(auth/saml): add SAML authentication filter [dubbo-go-pixiu]
Skylm808 opened a new pull request, #893:
URL: https://github.com/apache/dubbo-go-pixiu/pull/893
<!-- Thanks for sending a pull request!
-->
**What this PR does**:
Add a SAML authentication filter for dubbo-go-pixiu gateway based on `crewjam/saml`.
This PR includes:
- SP metadata endpoint (`/saml/metadata`) for IdP configuration
- Assertion Consumer Service endpoint (`/saml/acs`) for processing SAML responses
- Session-based authentication with cookie management
- Configurable path-based protection rules
- SAML attribute forwarding to backend services via HTTP headers
- Header spoofing prevention for SAML-controlled headers
- CookieSameSite handling for cross-site ACS POST compatibility
- User documentation for SAML filter configuration and behavior
**Which issue(s) this PR fixes**:
Fixes #888
**Special notes for your reviewer**:
- This filter allows Pixiu to act as a SAML Service Provider (SP)
- `allow_idp_initiated` is intended mainly for local HTTP dev/test environments where browser cookie restrictions can break the standard SP-initiated flow
- Added unit tests for config validation, session handling, header forwarding, config isolation, and CookieSameSite behavior
**Does this PR introduce a user-facing change?**:
```release-note
Add SAML authentication filter (`dgp.filter.http.auth.saml`) supporting
SSO via SAML 2.0 Identity Providers.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org
Re: [PR] feat(auth/saml): add SAML authentication filter [dubbo-go-pixiu]
Posted by "codecov-commenter (via GitHub)" <gi...@apache.org>.
codecov-commenter commented on PR #893:
URL: https://github.com/apache/dubbo-go-pixiu/pull/893#issuecomment-4074674568
## [Codecov](https://app.codecov.io/gh/apache/dubbo-go-pixiu/pull/893?dropdown=coverage&src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) Report
:x: Patch coverage is `76.24309%` with `43 lines` in your changes missing coverage. Please review.
:white_check_mark: Project coverage is 22.06%. Comparing base ([`5257003`](https://app.codecov.io/gh/apache/dubbo-go-pixiu/commit/5257003f130a6188d82952677238f9816d480a7a?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)) to head ([`69cf896`](https://app.codecov.io/gh/apache/dubbo-go-pixiu/commit/69cf8967b5626511ac537d14aeb0f0a7951d89ca?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)).
| [Files with missing lines](https://app.codecov.io/gh/apache/dubbo-go-pixiu/pull/893?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | Patch % | Lines |
|---|---|---|
| [pkg/filter/auth/saml/saml.go](https://app.codecov.io/gh/apache/dubbo-go-pixiu/pull/893?src=pr&el=tree&filepath=pkg%2Ffilter%2Fauth%2Fsaml%2Fsaml.go&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-cGtnL2ZpbHRlci9hdXRoL3NhbWwvc2FtbC5nbw==) | 73.71% | [26 Missing and 15 partials :warning: ](https://app.codecov.io/gh/apache/dubbo-go-pixiu/pull/893?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
| [pkg/filter/auth/saml/config.go](https://app.codecov.io/gh/apache/dubbo-go-pixiu/pull/893?src=pr&el=tree&filepath=pkg%2Ffilter%2Fauth%2Fsaml%2Fconfig.go&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-cGtnL2ZpbHRlci9hdXRoL3NhbWwvY29uZmlnLmdv) | 92.00% | [1 Missing and 1 partial :warning: ](https://app.codecov.io/gh/apache/dubbo-go-pixiu/pull/893?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
<details><summary>Additional details and impacted files</summary>
```diff
@@ Coverage Diff @@
## develop #893 +/- ##
===========================================
+ Coverage 21.57% 22.06% +0.49%
===========================================
Files 268 270 +2
Lines 19888 20069 +181
===========================================
+ Hits 4291 4429 +138
- Misses 15164 15191 +27
- Partials 433 449 +16
```
| [Flag](https://app.codecov.io/gh/apache/dubbo-go-pixiu/pull/893/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | Coverage Δ | |
|---|---|---|
| [unittests](https://app.codecov.io/gh/apache/dubbo-go-pixiu/pull/893/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `22.06% <76.24%> (+0.49%)` | :arrow_up: |
Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#carryforward-flags-in-the-pull-request-comment) to find out more.
</details>
[:umbrella: View full report in Codecov by Sentry](https://app.codecov.io/gh/apache/dubbo-go-pixiu/pull/893?dropdown=coverage&src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).
:loudspeaker: Have feedback on the report? [Share it here](https://about.codecov.io/codecov-pr-comment-feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).
<details><summary> :rocket: New features to boost your workflow: </summary>
- :snowflake: [Test Analytics](https://docs.codecov.com/docs/test-analytics): Detect flaky tests, report on failures, and find test suite problems.
- :package: [JS Bundle Analysis](https://docs.codecov.com/docs/javascript-bundle-analysis): Save yourself from yourself by tracking and limiting bundle sizes in JS merges.
</details>
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org
Re: [PR] feat(auth/saml): add SAML authentication filter [dubbo-go-pixiu]
Posted by "sonarqubecloud[bot] (via GitHub)" <gi...@apache.org>.
sonarqubecloud[bot] commented on PR #893:
URL: https://github.com/apache/dubbo-go-pixiu/pull/893#issuecomment-4072834005
## [](https://sonarcloud.io/dashboard?id=apache_dubbo-go-pixiu&pullRequest=893) **Quality Gate passed**
Issues
 [33 New issues](https://sonarcloud.io/project/issues?id=apache_dubbo-go-pixiu&pullRequest=893&issueStatuses=OPEN,CONFIRMED&sinceLeakPeriod=true)
 [0 Accepted issues](https://sonarcloud.io/project/issues?id=apache_dubbo-go-pixiu&pullRequest=893&issueStatuses=ACCEPTED)
Measures
 [0 Security Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache_dubbo-go-pixiu&pullRequest=893&issueStatuses=OPEN,CONFIRMED&sinceLeakPeriod=true)
 [0.0% Coverage on New Code](https://sonarcloud.io/component_measures?id=apache_dubbo-go-pixiu&pullRequest=893&metric=new_coverage&view=list)
 [0.0% Duplication on New Code](https://sonarcloud.io/component_measures?id=apache_dubbo-go-pixiu&pullRequest=893&metric=new_duplicated_lines_density&view=list)
[See analysis details on SonarQube Cloud](https://sonarcloud.io/dashboard?id=apache_dubbo-go-pixiu&pullRequest=893)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org
Re: [PR] feat(auth/saml): add SAML authentication filter [dubbo-go-pixiu]
Posted by "Skylm808 (via GitHub)" <gi...@apache.org>.
Skylm808 commented on PR #893:
URL: https://github.com/apache/dubbo-go-pixiu/pull/893#issuecomment-4102843257
我从日志看,失败用例是 `ai/kvcache/mock`,好像确实跟我的saml无关
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org
Re: [PR] feat(auth/saml): add SAML authentication filter [dubbo-go-pixiu]
Posted by "sonarqubecloud[bot] (via GitHub)" <gi...@apache.org>.
sonarqubecloud[bot] commented on PR #893:
URL: https://github.com/apache/dubbo-go-pixiu/pull/893#issuecomment-4072804302
## [](https://sonarcloud.io/dashboard?id=apache_dubbo-go-pixiu&pullRequest=893) **Quality Gate passed**
Issues
 [33 New issues](https://sonarcloud.io/project/issues?id=apache_dubbo-go-pixiu&pullRequest=893&issueStatuses=OPEN,CONFIRMED&sinceLeakPeriod=true)
 [0 Accepted issues](https://sonarcloud.io/project/issues?id=apache_dubbo-go-pixiu&pullRequest=893&issueStatuses=ACCEPTED)
Measures
 [0 Security Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache_dubbo-go-pixiu&pullRequest=893&issueStatuses=OPEN,CONFIRMED&sinceLeakPeriod=true)
 [0.0% Coverage on New Code](https://sonarcloud.io/component_measures?id=apache_dubbo-go-pixiu&pullRequest=893&metric=new_coverage&view=list)
 [0.0% Duplication on New Code](https://sonarcloud.io/component_measures?id=apache_dubbo-go-pixiu&pullRequest=893&metric=new_duplicated_lines_density&view=list)
[See analysis details on SonarQube Cloud](https://sonarcloud.io/dashboard?id=apache_dubbo-go-pixiu&pullRequest=893)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org
Re: [PR] feat(auth/saml): add SAML authentication filter [dubbo-go-pixiu]
Posted by "Alanxtl (via GitHub)" <gi...@apache.org>.
Alanxtl commented on PR #893:
URL: https://github.com/apache/dubbo-go-pixiu/pull/893#issuecomment-4102175031
这个ci fail检查一下 应该不是你的问题
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org
Re: [PR] feat(auth/saml): add SAML authentication filter [dubbo-go-pixiu]
Posted by "sonarqubecloud[bot] (via GitHub)" <gi...@apache.org>.
sonarqubecloud[bot] commented on PR #893:
URL: https://github.com/apache/dubbo-go-pixiu/pull/893#issuecomment-4060171574
## [](https://sonarcloud.io/dashboard?id=apache_dubbo-go-pixiu&pullRequest=893) **Quality Gate passed**
Issues
 [35 New issues](https://sonarcloud.io/project/issues?id=apache_dubbo-go-pixiu&pullRequest=893&issueStatuses=OPEN,CONFIRMED&sinceLeakPeriod=true)
 [0 Accepted issues](https://sonarcloud.io/project/issues?id=apache_dubbo-go-pixiu&pullRequest=893&issueStatuses=ACCEPTED)
Measures
 [0 Security Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache_dubbo-go-pixiu&pullRequest=893&issueStatuses=OPEN,CONFIRMED&sinceLeakPeriod=true)
 [0.0% Coverage on New Code](https://sonarcloud.io/component_measures?id=apache_dubbo-go-pixiu&pullRequest=893&metric=new_coverage&view=list)
 [0.0% Duplication on New Code](https://sonarcloud.io/component_measures?id=apache_dubbo-go-pixiu&pullRequest=893&metric=new_duplicated_lines_density&view=list)
[See analysis details on SonarQube Cloud](https://sonarcloud.io/dashboard?id=apache_dubbo-go-pixiu&pullRequest=893)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org
Re: [PR] feat(auth/saml): add SAML authentication filter [dubbo-go-pixiu]
Posted by "sonarqubecloud[bot] (via GitHub)" <gi...@apache.org>.
sonarqubecloud[bot] commented on PR #893:
URL: https://github.com/apache/dubbo-go-pixiu/pull/893#issuecomment-4060332475
## [](https://sonarcloud.io/dashboard?id=apache_dubbo-go-pixiu&pullRequest=893) **Quality Gate passed**
Issues
 [33 New issues](https://sonarcloud.io/project/issues?id=apache_dubbo-go-pixiu&pullRequest=893&issueStatuses=OPEN,CONFIRMED&sinceLeakPeriod=true)
 [0 Accepted issues](https://sonarcloud.io/project/issues?id=apache_dubbo-go-pixiu&pullRequest=893&issueStatuses=ACCEPTED)
Measures
 [0 Security Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache_dubbo-go-pixiu&pullRequest=893&issueStatuses=OPEN,CONFIRMED&sinceLeakPeriod=true)
 [0.0% Coverage on New Code](https://sonarcloud.io/component_measures?id=apache_dubbo-go-pixiu&pullRequest=893&metric=new_coverage&view=list)
 [0.0% Duplication on New Code](https://sonarcloud.io/component_measures?id=apache_dubbo-go-pixiu&pullRequest=893&metric=new_duplicated_lines_density&view=list)
[See analysis details on SonarQube Cloud](https://sonarcloud.io/dashboard?id=apache_dubbo-go-pixiu&pullRequest=893)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org
Re: [PR] feat(auth/saml): add SAML authentication filter [dubbo-go-pixiu]
Posted by "Alanxtl (via GitHub)" <gi...@apache.org>.
Alanxtl commented on code in PR #893:
URL: https://github.com/apache/dubbo-go-pixiu/pull/893#discussion_r2939997768
##########
docs/user/filter/saml.md:
##########
Review Comment:
1. pls provide README_CN
2. write same doc in `dubbo-website`
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org
Re: [PR] feat(auth/saml): add SAML authentication filter [dubbo-go-pixiu]
Posted by "sonarqubecloud[bot] (via GitHub)" <gi...@apache.org>.
sonarqubecloud[bot] commented on PR #893:
URL: https://github.com/apache/dubbo-go-pixiu/pull/893#issuecomment-4060290534
## [](https://sonarcloud.io/dashboard?id=apache_dubbo-go-pixiu&pullRequest=893) **Quality Gate passed**
Issues
 [35 New issues](https://sonarcloud.io/project/issues?id=apache_dubbo-go-pixiu&pullRequest=893&issueStatuses=OPEN,CONFIRMED&sinceLeakPeriod=true)
 [0 Accepted issues](https://sonarcloud.io/project/issues?id=apache_dubbo-go-pixiu&pullRequest=893&issueStatuses=ACCEPTED)
Measures
 [0 Security Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache_dubbo-go-pixiu&pullRequest=893&issueStatuses=OPEN,CONFIRMED&sinceLeakPeriod=true)
 [0.0% Coverage on New Code](https://sonarcloud.io/component_measures?id=apache_dubbo-go-pixiu&pullRequest=893&metric=new_coverage&view=list)
 [0.0% Duplication on New Code](https://sonarcloud.io/component_measures?id=apache_dubbo-go-pixiu&pullRequest=893&metric=new_duplicated_lines_density&view=list)
[See analysis details on SonarQube Cloud](https://sonarcloud.io/dashboard?id=apache_dubbo-go-pixiu&pullRequest=893)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org
Re: [PR] feat(auth/saml): add SAML authentication filter [dubbo-go-pixiu]
Posted by "Alanxtl (via GitHub)" <gi...@apache.org>.
Alanxtl commented on PR #893:
URL: https://github.com/apache/dubbo-go-pixiu/pull/893#issuecomment-4067251606
our project use `import-formatter` to format import blocks, that's the reason why ur CI fails. For you, u should
1. run `go install github.com/dubbogo/tools/cmd/imports-formatter@latest`
2. cd to the root dir of `dubbo-go-pixiu`
3. run `imports-formatter`
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org
Re: [PR] feat(auth/saml): add SAML authentication filter [dubbo-go-pixiu]
Posted by "Alanxtl (via GitHub)" <gi...@apache.org>.
Alanxtl merged PR #893:
URL: https://github.com/apache/dubbo-go-pixiu/pull/893
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org
Re: [PR] feat(auth/saml): add SAML authentication filter [dubbo-go-pixiu]
Posted by "Skylm808 (via GitHub)" <gi...@apache.org>.
Skylm808 commented on code in PR #893:
URL: https://github.com/apache/dubbo-go-pixiu/pull/893#discussion_r2944737850
##########
docs/user/filter/saml.md:
##########
Review Comment:
I will add the Chinese doc in this PR.
For the sample and website docs, I will open follow-up PRs in `dubbo-go-pixiu-samples` and `dubbo-website` and link them here.
I will also run `import-formatter` locally to fix the import formatting issue.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org