apache / apisix

The Cloud-Native API Gateway
https://apisix.apache.org/blog/
Apache License 2.0
14.35k stars 2.49k forks source link

Can you add other session configuration parameters of openid-connect? #10797

Open illidan33 opened 8 months ago

illidan33 commented 8 months ago

Description

I want to set the session expiration time, but the documentation only supports 'secret'. The document only provides the secret parameter for configuring a session. Can you add support for other session configuration parameters.

The document's url is https://apisix.apache.org/zh/docs/apisix/plugins/openid-connect/

image

"openid-connect": { "_meta": { "disable": false }, "access_token_in_authorization_header": true, "refresh_session_interval": 3600, "scope": "", "session": { "secret": "" }, "timeout": 3, "use_pkce": true }

Openid-connect uses the lua-resty-sesseion package, which provides session configuration. Its address is https://github.com/bungle/lua-resty-session

image

Environment

kayx23 commented 8 months ago

I thought session expiry is something one could configure on the IdP side?

illidan33 commented 8 months ago

I thought session expiry is something one could configure on the IdP side?

The session is set by plugin openid-connect when i use apisix. So it has nothing to do with idp, which does not control the session set by openid-connect.

kayx23 commented 8 months ago

@lakshya8066 @Vacant2333 Please help with this question if you can, thanks.

Vacant2333 commented 8 months ago

hello @illidan33 looks like we can add this parameter to the APISIX plugin image

illidan33 commented 8 months ago

hello @illidan33 looks like we can add this parameter to the APISIX plugin image

@Vacant2333 Thank you! Can you add an extra field ‘rolling_timeout’?

Vacant2333 commented 8 months ago

hello @illidan33 looks like we can add this parameter to the APISIX plugin image

Thank you! Can you add an extra field ‘rolling_time’?

yes, can u help me list the parameters that which we need add to the plugin, and i will check and try to do that

illidan33 commented 8 months ago

hello @illidan33 looks like we can add this parameter to the APISIX plugin image

Thank you! Can you add an extra field ‘rolling_time’?

yes, can u help me list the parameters that which we need add to the plugin, and i will check and try to do that

Of course.

illidan33 commented 8 months ago

hello @illidan33 looks like we can add this parameter to the APISIX plugin image

Thank you! Can you add an extra field ‘rolling_time’?

yes, can u help me list the parameters that which we need add to the plugin, and i will check and try to do that

Of course.

@Vacant2333 The following are common session configuration fields, please add them to the plugin, thank you.

Vacant2333 commented 8 months ago

hello @illidan33 looks like we can add this parameter to the APISIX plugin image

Thank you! Can you add an extra field ‘rolling_time’?

yes, can u help me list the parameters that which we need add to the plugin, and i will check and try to do that

Of course.

@Vacant2333 The following are common session configuration fields, please add them to the plugin, thank you.

  • cookie_name
  • cookie_path
  • cookie_http_only
  • cookie_secure
  • cookie_priority
  • cookie_same_site
  • cookie_same_party
  • remember
  • remember_safety
  • remember_cookie_name
  • stale_ttl
  • idling_timeout
  • rolling_timeout
  • absolute_timeout
  • remember_rolling_timeout
  • remember_absolute_timeout

ok, i will need consider these was necessay, thanks!

Vacant2333 commented 8 months ago

@kayx23 how do u think about add these parameters, can u help assign this issue to me? cc @shreemaan-abhishek

illidan33 commented 8 months ago

@Vacant2333 Hi, will the update come online in the near future?

Revolyssup commented 8 months ago

@illidan33 Yes this is on the proposal stage currently so there is no fixed date but this task is on my plate

illidan33 commented 7 months ago

@Vacant2333 @Revolyssup hi, I solved the issue. Can you take a look. [https://github.com/apache/apisix/pull/10919](session configuration)