vttranlina commented on code in PR #1565: URL: https://github.com/apache/james-project/pull/1565#discussion_r1199930880
########## examples/oidc/apisix/conf/apisix.yaml: ########## @@ -0,0 +1,237 @@ +routes: + # OIDC authentication endpoints + - + id: jmap + uri: /oidc/jmap + service_id: jmap_service_oidc + methods: + - POST + - OPTIONS + plugin_config_id: jmap-plugin + plugins: + proxy-rewrite: + uri: /jmap + - + id: jmap_websocket + uri: /oidc/jmap/ws + service_id: jmap_service_oidc + enable_websocket: true + methods: + - GET + - OPTIONS + plugin_config_id: jmap-plugin + plugins: + proxy-rewrite: + uri: /jmap/ws + - + id: jmap_session_oidc + uri: /oidc/jmap/session + service_id: jmap_service_oidc + methods: + - GET + - OPTIONS + plugin_config_id: jmap-plugin + plugins: + proxy-rewrite: + uri: /jmap/session + - + id: download + uri: /oidc/download/* + service_id: jmap_service_oidc + methods: + - GET + - OPTIONS + plugin_config_id: jmap-plugin + plugins: + proxy-rewrite: + regex_uri: + - "^/oidc/download/(.*)/(.*)" + - "/download/$1/$2" + - + id: upload + uri: /oidc/upload/* + service_id: jmap_service_oidc + methods: + - POST + - OPTIONS + plugin_config_id: jmap-plugin + plugins: + proxy-rewrite: + regex_uri: + - "^/oidc/upload/(.*)" + - "/upload/$1" + - + id: web_known_finger + uris: + - /oidc/.well-known/webfinger + - /.well-known/webfinger + service_id: jmap_service_basic_auth + methods: + - GET + - OPTIONS + plugin_config_id: jmap-plugin + plugins: + proxy-rewrite: + uri: /.well-known/webfinger + - + id: web_known_linagora_ecosystem + uri: /oidc/.well-known/linagora-ecosystem + service_id: jmap_service_oidc + methods: + - GET + - OPTIONS + plugin_config_id: jmap-plugin + plugins: + proxy-rewrite: + uri: /.well-known/linagora-ecosystem + - + id: web_known_jmap + uri: /oidc/.well-known/jmap + service_id: jmap_service_oidc + methods: + - GET + - OPTIONS + plugin_config_id: jmap-plugin + plugins: + proxy-rewrite: + uri: /.well-known/jmap + response-rewrite: + _meta: + filter: + - - request_method + - "~=" + - OPTIONS + headers: + set: + Location: "/oidc/jmap/session" + + # Basic authentication endpoints + - id: jmap_session_basic_auth + uri: /jmap/session + service_id: jmap_service_basic_auth + methods: + - GET + - OPTIONS + plugin_config_id: jmap-plugin + plugins: + proxy-rewrite: + headers: + set: + X-JMAP-PREFIX: 'http://apisix.example.com:9080' + X-JMAP-WEBSOCKET-PREFIX: 'ws://apisix.example.com:9080' + - id: jmap_basic_auth + uri: /jmap + service_id: jmap_service_basic_auth + methods: + - POST + - OPTIONS + plugin_config_id: jmap-plugin + - id: download_basic_auth + uri: /download/* + service_id: jmap_service_basic_auth + methods: + - GET + - OPTIONS + plugin_config_id: jmap-plugin + - id: upload_basic_auth + uri: /upload/* + service_id: jmap_service_basic_auth + methods: + - POST + - OPTIONS + plugin_config_id: jmap-plugin + - id: web_known_linagora_ecosystem_basic_auth + uri: /.well-known/linagora-ecosystem + service_id: jmap_service_basic_auth + methods: + - GET + - OPTIONS + plugin_config_id: jmap-plugin + - id: web_known_jmap_basic_auth + uri: /.well-known/jmap + service_id: jmap_service_basic_auth + methods: + - GET + - OPTIONS + plugin_config_id: jmap-plugin + - id: jmap_websocket_basic_auth + uri: /jmap/ws + service_id: jmap_service_basic_auth + enable_websocket: true + methods: + - GET + - OPTIONS + plugin_config_id: jmap-plugin + +services: + - + id: jmap_service_oidc + upstream_id: jmap_upstream + plugins: + openid-connect: + _meta: + filter: + - - request_method + - "~=" + - OPTIONS + client_id: "james-thunderbird" + client_secret: "Xw9ht1veTu0Tk5sMMy03PdzY3AiFvssw" Review Comment: the first I think is `oidc` is Code flow, it doesn't has a `client_secret` value. (while apisix document request that) I just tested it, it works when `client_secret` is empty -- 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: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
