You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by GitBox <gi...@apache.org> on 2021/08/18 03:25:27 UTC
[GitHub] [apisix] tzssangglass opened a new pull request #4845: fix(authz-keycloak): set default permissions as empty table when lazy_load_path is false
tzssangglass opened a new pull request #4845:
URL: https://github.com/apache/apisix/pull/4845
### What this PR does / why we need it:
<!--- Why is this change required? What problem does it solve? -->
<!--- If it fixes an open issue, please link to the issue here. -->
fix: #4840
### Pre-submission checklist:
* [x] Did you explain what problem does this PR solve? Or what new features have been added?
* [x] Have you added corresponding test cases?
* [ ] Have you modified the corresponding document?
* [x] Is this PR backward compatible? **If it is not backward compatible, please discuss on the [mailing list](https://github.com/apache/apisix/tree/master#community) first**
--
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@apisix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix] spacewander commented on a change in pull request #4845: fix(authz-keycloak): set default permissions as empty table when lazy_load_path is false
Posted by GitBox <gi...@apache.org>.
spacewander commented on a change in pull request #4845:
URL: https://github.com/apache/apisix/pull/4845#discussion_r690885793
##########
File path: apisix/plugins/authz-keycloak.lua
##########
@@ -83,6 +84,9 @@ local schema = {
{
properties = {
lazy_load_paths = {enum = {false}},
+ },
+ anyOf = {
+ {required = {"permissions"}}
Review comment:
We don't need to require it as we already provide a default value
##########
File path: t/plugin/authz-keycloak.t
##########
@@ -152,7 +152,33 @@ done
-=== TEST 6: full schema check
+=== TEST 6: no permissions when lazy_load_paths=false
Review comment:
Please add new test at the end
##########
File path: t/plugin/authz-keycloak.t
##########
@@ -152,7 +152,33 @@ done
-=== TEST 6: full schema check
+=== TEST 6: no permissions when lazy_load_paths=false
Review comment:
If I am correct, the previous code will be broken at https://github.com/apache/apisix/blob/b72404f643f37b10eb164056d784c33a97251c46/apisix/plugins/authz-keycloak.lua#L591 even without reaching keyclock.
--
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@apisix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix] tzssangglass commented on a change in pull request #4845: fix(authz-keycloak): set default permissions as empty table when lazy_load_path is false
Posted by GitBox <gi...@apache.org>.
tzssangglass commented on a change in pull request #4845:
URL: https://github.com/apache/apisix/pull/4845#discussion_r690981368
##########
File path: t/plugin/authz-keycloak.t
##########
@@ -152,7 +152,33 @@ done
-=== TEST 6: full schema check
+=== TEST 6: no permissions when lazy_load_paths=false
Review comment:
got
--
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@apisix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix] tzssangglass commented on a change in pull request #4845: fix(authz-keycloak): set default permissions as empty table when lazy_load_path is false
Posted by GitBox <gi...@apache.org>.
tzssangglass commented on a change in pull request #4845:
URL: https://github.com/apache/apisix/pull/4845#discussion_r690925621
##########
File path: apisix/plugins/authz-keycloak.lua
##########
@@ -83,6 +84,9 @@ local schema = {
{
properties = {
lazy_load_paths = {enum = {false}},
+ },
+ anyOf = {
+ {required = {"permissions"}}
Review comment:
got
##########
File path: t/plugin/authz-keycloak.t
##########
@@ -152,7 +152,33 @@ done
-=== TEST 6: full schema check
+=== TEST 6: no permissions when lazy_load_paths=false
Review comment:
I deleted the test case ...... I can't pull up the keyclock container process locally ......
##########
File path: t/plugin/authz-keycloak.t
##########
@@ -152,7 +152,33 @@ done
-=== TEST 6: full schema check
+=== TEST 6: no permissions when lazy_load_paths=false
Review comment:
got
--
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@apisix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix] spacewander merged pull request #4845: fix(authz-keycloak): set permissions as empty table when lazy_load_path is false
Posted by GitBox <gi...@apache.org>.
spacewander merged pull request #4845:
URL: https://github.com/apache/apisix/pull/4845
--
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@apisix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix] spacewander commented on a change in pull request #4845: fix(authz-keycloak): set default permissions as empty table when lazy_load_path is false
Posted by GitBox <gi...@apache.org>.
spacewander commented on a change in pull request #4845:
URL: https://github.com/apache/apisix/pull/4845#discussion_r690944678
##########
File path: t/plugin/authz-keycloak.t
##########
@@ -152,7 +152,33 @@ done
-=== TEST 6: full schema check
+=== TEST 6: no permissions when lazy_load_paths=false
Review comment:
If I am correct, the previous code will be broken at https://github.com/apache/apisix/blob/b72404f643f37b10eb164056d784c33a97251c46/apisix/plugins/authz-keycloak.lua#L591 even without reaching keyclock.
--
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@apisix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix] spacewander commented on a change in pull request #4845: fix(authz-keycloak): set default permissions as empty table when lazy_load_path is false
Posted by GitBox <gi...@apache.org>.
spacewander commented on a change in pull request #4845:
URL: https://github.com/apache/apisix/pull/4845#discussion_r690885793
##########
File path: apisix/plugins/authz-keycloak.lua
##########
@@ -83,6 +84,9 @@ local schema = {
{
properties = {
lazy_load_paths = {enum = {false}},
+ },
+ anyOf = {
+ {required = {"permissions"}}
Review comment:
We don't need to require it as we already provide a default value
##########
File path: t/plugin/authz-keycloak.t
##########
@@ -152,7 +152,33 @@ done
-=== TEST 6: full schema check
+=== TEST 6: no permissions when lazy_load_paths=false
Review comment:
Please add new test at the end
--
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@apisix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix] tzssangglass commented on a change in pull request #4845: fix(authz-keycloak): set default permissions as empty table when lazy_load_path is false
Posted by GitBox <gi...@apache.org>.
tzssangglass commented on a change in pull request #4845:
URL: https://github.com/apache/apisix/pull/4845#discussion_r690926421
##########
File path: t/plugin/authz-keycloak.t
##########
@@ -152,7 +152,33 @@ done
-=== TEST 6: full schema check
+=== TEST 6: no permissions when lazy_load_paths=false
Review comment:
I deleted the test case ...... I can't pull up the keyclock container process locally ......
--
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@apisix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix] tzssangglass commented on a change in pull request #4845: fix(authz-keycloak): set default permissions as empty table when lazy_load_path is false
Posted by GitBox <gi...@apache.org>.
tzssangglass commented on a change in pull request #4845:
URL: https://github.com/apache/apisix/pull/4845#discussion_r690925621
##########
File path: apisix/plugins/authz-keycloak.lua
##########
@@ -83,6 +84,9 @@ local schema = {
{
properties = {
lazy_load_paths = {enum = {false}},
+ },
+ anyOf = {
+ {required = {"permissions"}}
Review comment:
got
--
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@apisix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix] spacewander merged pull request #4845: fix(authz-keycloak): set permissions as empty table when lazy_load_path is false
Posted by GitBox <gi...@apache.org>.
spacewander merged pull request #4845:
URL: https://github.com/apache/apisix/pull/4845
--
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@apisix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org