rbstp opened a new pull request, #8854:
URL: https://github.com/apache/incubator-devlake/pull/8854

   <!--
   Licensed to the Apache Software Foundation (ASF) under one or more
   contributor license agreements.  See the NOTICE file distributed with
   this work for additional information regarding copyright ownership.
   The ASF licenses this file to You under the Apache License, Version 2.0
   (the "License"); you may not use this file except in compliance with
   the License.  You may obtain a copy of the License at
   
       http://www.apache.org/licenses/LICENSE-2.0
   
   Unless required by applicable law or agreed to in writing, software
   distributed under the License is distributed on an "AS IS" BASIS,
   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
   See the License for the specific language governing permissions and
   limitations under the License.
   -->
   <!--
   Thanks for submitting a pull request!
   
   We appreciate you spending the time to work on these changes.
   Please fill out as many sections below as possible.
   -->
   
   ### Summary
   This PR adds OIDC login behind a default-off `AUTH_ENABLED` switch. 
Providers are configured via `OIDC_PROVIDERS` plus per-name env blocks, so a 
deployment can offer Entra ID and Google (or any other OIDC IdP) side by side. 
Sessions are signed JWTs in HttpOnly cookies, backed by a new `auth_sessions` 
table so they can be revoked server-side without rotating `SESSION_SECRET`.
   
   CSRF is enforced on state-changing requests when the caller is using the 
session cookie; API-key, Basic auth, and proxy-header callers are unaffected. 
Azure Workload Identity is supported for the Entra provider so AKS deployments 
can drop `CLIENT_SECRET` in favor of a federated SA-token assertion.
   
   When `AUTH_ENABLED=false`, which is the default so no need to add it, the 
system behaves exactly as before.
   
   `env.example` contains the variables needed to add the OIDC login.
   
   ### Does this close any open issues?
   Refs: https://github.com/apache/incubator-devlake/discussions/8694
   Refs: https://devlake-io.slack.com/archives/C03AJH1HBAT/p1776917914734679
   
   ### Screenshots
   Example with Google, validated with Entra ID as well.
   <img width="567" height="377" alt="image" 
src="https://github.com/user-attachments/assets/143ff84b-30fe-48e4-a957-6890d1088c30";
 />
   <img width="1204" height="493" alt="image" 
src="https://github.com/user-attachments/assets/2fb88007-fc7c-48e6-b11d-fa9ad4079487";
 />
   <img width="1145" height="669" alt="image" 
src="https://github.com/user-attachments/assets/44ca62f0-db67-42b7-8491-3d919a1107c6";
 />
   <img width="204" height="92" alt="image" 
src="https://github.com/user-attachments/assets/4191f86b-6ad7-4769-87b2-afaff4e84692";
 />
   
   
   ### Other Information
   Validated with Entra ID (AAD) and Google Auth, but it should work with other 
providers as well, as long as they respect the OIDC spec.
   
   Expect a 401 in DevTools on first load before the redirect to `/login`. It 
is the axios interceptor bouncing unauthenticated requests through the OIDC 
flow, not a bug.


-- 
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]

Reply via email to