You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by "flea1lt (via GitHub)" <gi...@apache.org> on 2024/02/28 07:59:00 UTC
[I] feat: uri_without_ticket function from cas-auth plugin need to generate uri based on container enviroment [apisix]
flea1lt opened a new issue, #10977:
URL: https://github.com/apache/apisix/issues/10977
### Description
When deploying apisix using `apisix-docker` in a k8s environment, some users may access apisix via a domain using http/https on ports 80/443
However, when enable `cas-auth` plugin, the [uri_without_ticket](https://github.com/apache/apisix/blob/614be2a9e0031c9b95e3a97502b42b47989e2bc0/apisix/plugins/cas-auth.lua#L55) function generates uri based on `ctx.var.host`, which commonly resolves to port 9080
```lua
local function uri_without_ticket(conf, ctx)
return ctx.var.scheme .. "://" .. ctx.var.host .. ":" ..
ctx.var.server_port .. conf.cas_callback_uri
end
```
So when the CAS server redirects upon successful user login, it directs to this port, resulting in the callback failing to reach apisix as the domain is only accessed via ports 80/443.
To address this, I propose introducing a new configuration option, `callback_port`, within the cas-auth plugin.
This configuration would allow users to specify the correct port for accessing apisix via the domain, thereby ensuring successful callbacks from the CAS server.
--
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.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] feat: uri_without_ticket function from cas-auth plugin need to generate uri based on container enviroment [apisix]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on issue #10977:
URL: https://github.com/apache/apisix/issues/10977#issuecomment-2687471364
This issue has been marked as stale due to 350 days of inactivity. It will be closed in 2 weeks if no further activity occurs. If this issue is still relevant, please simply write any comment. Even if closed, you can still revive the issue at any time or discuss it on the dev@apisix.apache.org list. Thank you for your contributions.
--
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
Re: [I] feat: uri_without_ticket function from cas-auth plugin need to generate uri based on container enviroment [apisix]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] closed issue #10977: feat: uri_without_ticket function from cas-auth plugin need to generate uri based on container enviroment
URL: https://github.com/apache/apisix/issues/10977
--
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
Re: [I] feat: uri_without_ticket function from cas-auth plugin need to generate uri based on container enviroment [apisix]
Posted by "shreemaan-abhishek (via GitHub)" <gi...@apache.org>.
shreemaan-abhishek commented on issue #10977:
URL: https://github.com/apache/apisix/issues/10977#issuecomment-1994859926
would you like to submit a PR for this?
--
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
Re: [I] feat: uri_without_ticket function from cas-auth plugin need to generate uri based on container enviroment [apisix]
Posted by "shreemaan-abhishek (via GitHub)" <gi...@apache.org>.
shreemaan-abhishek commented on issue #10977:
URL: https://github.com/apache/apisix/issues/10977#issuecomment-1970380957
`ctx.var.server_port` resolves to a port on which apisix is listening (not 9080 always) isn't it? Am I missing something?
--
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
Re: [I] feat: uri_without_ticket function from cas-auth plugin need to generate uri based on container enviroment [apisix]
Posted by "flea1lt (via GitHub)" <gi...@apache.org>.
flea1lt commented on issue #10977:
URL: https://github.com/apache/apisix/issues/10977#issuecomment-1970553057
> `ctx.var.server_port` resolves to a port on which apisix is listening (not 9080 always) isn't it? Am I missing something?
The port is not always 9080.
I want to stress that `ctx.var.server_port` is the container port apisix listening to.
But the fact is, when it's the container port, CAS will encounter a connect error because container port can not be used outside k8s.
So I suggest a new conf to solve this situation.
--
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
Re: [I] feat: uri_without_ticket function from cas-auth plugin need to generate uri based on container enviroment [apisix]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on issue #10977:
URL: https://github.com/apache/apisix/issues/10977#issuecomment-2720677074
This issue has been closed due to lack of activity. If you think that is incorrect, or the issue requires additional review, you can revive the issue at any time.
--
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