apisix icon indicating copy to clipboard operation
apisix copied to clipboard

feat: support OIDC claim validator (#8772)

Open beardnick opened this issue 1 year ago • 16 comments

Description

Fixes #8772

Checklist

  • [x] I have explained the need for this PR and the problem it solves
  • [x] I have explained the changes or the new features added to this PR
  • [x] I have added tests corresponding to this change
  • [x] I have updated the documentation to reflect this change
  • [x] I have verified that this change is backward compatible (If not, please discuss on the APISIX mailing list first)

beardnick avatar Dec 12 '24 09:12 beardnick

This pull request has been marked as stale due to 60 days of inactivity. It will be closed in 4 weeks if no further activity occurs. If you think that's incorrect or this pull request should instead be reviewed, please simply write any comment. Even if closed, you can still revive the PR at any time or discuss it on the [email protected] list. Thank you for your contributions.

github-actions[bot] avatar Mar 26 '25 10:03 github-actions[bot]

Hi @beardnick, please make the test pass

Baoyuantop avatar Mar 26 '25 10:03 Baoyuantop

Hi @beardnick, please make the test pass

Ok, I'll take a look

beardnick avatar Mar 26 '25 10:03 beardnick

Hi @beardnick, do you have time to continue working on this PR?

Baoyuantop avatar Apr 03 '25 05:04 Baoyuantop

Hi @beardnick, do you have time to continue working on this PR?

Sorry, I'm busy last few days. I'll continue work on it tomorrow.

beardnick avatar Apr 03 '25 05:04 beardnick

@Baoyuantop I took a more detailed look at the code. Seems this pr(https://github.com/apache/apisix/pull/11987) did something similar to my pr. Do you think my pr is still necessary?

beardnick avatar Apr 06 '25 04:04 beardnick

@Baoyuantop I took a more detailed look at the code. Seems this pr(#11987) did something similar to my pr. Do you think my pr is still necessary?

I'm not an apisix-developer but a user so I can't say anything about the implementation details. But I am looking to your PR to have the ability to configure the plugin to only allow requests through if the user has a "roles" claim containing one or more specific roles.

The PR you are referencing seems similar but geared towards checking the 'aud' claim only, which is nice but does not cover my use case.

jmaasing avatar Apr 06 '25 05:04 jmaasing

@Baoyuantop I took a more detailed look at the code. Seems this pr(#11987) did something similar to my pr. Do you think my pr is still necessary?

I will check it

Baoyuantop avatar Apr 23 '25 02:04 Baoyuantop

Hi @beardnick, I don't see this PR as conflicting with #11987, but rather as complementary features, with #11987 providing specific audience validation (in line with the OIDC specification) and #11824 providing a more generalized validation approach. cc @bzp2010

Baoyuantop avatar Apr 28 '25 14:04 Baoyuantop

Hi @beardnick, I don't see this PR as conflicting with #11987, but rather as complementary features, with #11987 providing specific audience validation (in line with the OIDC specification) and #11824 providing a more generalized validation approach. cc @bzp2010

Hi @Baoyuantop. Thank you for your help. My concern was that the APISIX team might not want to expose a flexible claim validator, like JSON Schema, to users. Since there is no design issue regarding this, I will continue working on this PR. I have updated the documentation.

beardnick avatar May 05 '25 08:05 beardnick

Hi @Baoyuantop, it seems that the failed tests are not caused by my code. Could you please help me run them again?

beardnick avatar May 07 '25 04:05 beardnick

Already rerun, please make sure you have merged the latest master branch

Baoyuantop avatar May 07 '25 06:05 Baoyuantop

Already rerun, please make sure you have merged the latest master branch

Hi @Baoyuantop, I've already merged the latest master. However, some tests still failed. Could you please help me rerun the failed tests?

beardnick avatar May 08 '25 15:05 beardnick

@Baoyuantop Could you please help to rerun the failed tests?

beardnick avatar Jun 09 '25 06:06 beardnick

@Baoyuantop Could you please help to rerun the failed tests?

Done

Baoyuantop avatar Jun 10 '25 02:06 Baoyuantop

@Baoyuantop Could you please help to rerun the failed tests?

Done

Please review this PR again.

beardnick avatar Jun 12 '25 02:06 beardnick

@Baoyuantop Please review this PR again.

beardnick avatar Jun 19 '25 10:06 beardnick

@Baoyuantop Please review this PR again.

beardnick avatar Jun 25 '25 11:06 beardnick

@Baoyuantop Please help me rerun the failed tests.

beardnick avatar Jul 10 '25 01:07 beardnick

The failed tests are not related to this PR.

Baoyuantop avatar Jul 10 '25 01:07 Baoyuantop

@bzp2010 @nic-6443 @Revolyssup @AlinsRan cc

beardnick avatar Jul 15 '25 01:07 beardnick

@bzp2010 @nic-6443 @Revolyssup @AlinsRan cc?

beardnick avatar Jul 18 '25 10:07 beardnick