lasdf1234 commented on code in PR #10883:
URL: https://github.com/apache/gravitino/pull/10883#discussion_r3158443905


##########
design-docs/gravitino-local-idp.md:
##########
@@ -0,0 +1,679 @@
+<!--
+  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.
+-->
+
+# Design of Local Authentication Support in Gravitino
+
+## 1. Background
+
+Apache Gravitino already has mature support for OAuth 2.0 authentication. 
Today, Gravitino acts as
+an OAuth 2.0 client and delegates authentication to an external identity 
provider (IdP), typically
+using the Client Credentials flow together with Bearer JWT.
+
+This model works well in enterprise deployments where an external IdP such as 
Okta, Azure AD, or
+Keycloak already exists. However, it introduces friction in several important 
scenarios:
+
+- **POC and demo environments**: users want to start Gravitino in minutes, 
without first deploying
+  and configuring a dedicated IdP.
+- **Offline or isolated environments**: air-gapped, edge, or embedded 
deployments may not have
+  access to an external identity service.
+- **Data sovereignty requirements**: some organizations do not allow identity 
information to be
+  managed by an external service.
+- **Operational simplicity**: small deployments may not want the cost and 
maintenance burden of a
+  separate OAuth server.
+
+To address these cases, Gravitino should provide an optional built-in local 
IdP mode with a simple
+username/password authentication flow.
+
+---
+
+## 2. Goals
+
+1. **Lower the barrier to entry**: allow users to evaluate and use Gravitino 
without deploying an
+   external IdP.
+
+2. **Support self-contained deployments**: provide a fully local 
authentication mechanism for
+   offline, air-gapped, and privacy-sensitive environments.
+
+3. **Keep the design intentionally simple**: optimize for POC and small 
deployment scenarios rather
+   than building a full-featured general-purpose identity platform.
+
+4. **Avoid vendor lock-in**: let users run Gravitino in environments where 
third-party IdPs are
+   impractical, undesirable, or cost-prohibitive.
+
+---
+
+## 3. Proposal
+
+### 3.1 Authentication Model
+
+The local IdP is introduced as a new Gravitino authenticator mode: **basic**.
+
+When enabled, Gravitino authenticates incoming requests through HTTP Basic 
authentication:
+
+```text
+Authorization: Basic <base64(username:password)>
+```
+
+This mode is intended for quick-start deployments and isolated environments. 
It should work out of
+the box with a minimal configuration and without any dependency on an external 
identity system.
+
+### 3.2 Why Basic Authentication
+
+The surveyed systems show that local authentication support typically 
converges on
+username/password-based flows. For Gravitino, simplicity matters more than 
protocol richness:
+
+- it shortens time-to-first-use,
+- it is easy to explain and operate,
+- it fits POC and offline scenarios well,
+- and it avoids introducing token lifecycle complexity into the server.
+
+For these reasons, the initial local IdP implementation uses:
+
+| Item | Decision |
+|---|---|
+| Credential type | Username / password |
+| Password storage | Database |
+| Local token support | No |
+| Recommended deployment scope | POC, offline, and isolated scenarios |
+
+### 3.3 Why Database Storage
+
+Passwords and user/group metadata should be stored in the Gravitino relational 
store rather than in
+files:
+
+- **File-based storage** requires a server restart to add users or rotate 
passwords.
+- **Database storage** supports normal metadata-style CRUD operations and 
matches Gravitino's
+  existing persistence model.
+
+Database-backed storage is the most practical choice for a built-in local IdP.
+
+### 3.4 Module Layout
+
+The local IdP feature should be implemented as an independent Gravitino module 
rather than being

Review Comment:
   Got I have been modified



##########
design-docs/gravitino-local-idp.md:
##########
@@ -0,0 +1,679 @@
+<!--
+  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.
+-->
+
+# Design of Local Authentication Support in Gravitino
+
+## 1. Background
+
+Apache Gravitino already has mature support for OAuth 2.0 authentication. 
Today, Gravitino acts as
+an OAuth 2.0 client and delegates authentication to an external identity 
provider (IdP), typically
+using the Client Credentials flow together with Bearer JWT.
+
+This model works well in enterprise deployments where an external IdP such as 
Okta, Azure AD, or
+Keycloak already exists. However, it introduces friction in several important 
scenarios:
+
+- **POC and demo environments**: users want to start Gravitino in minutes, 
without first deploying
+  and configuring a dedicated IdP.
+- **Offline or isolated environments**: air-gapped, edge, or embedded 
deployments may not have
+  access to an external identity service.
+- **Data sovereignty requirements**: some organizations do not allow identity 
information to be
+  managed by an external service.
+- **Operational simplicity**: small deployments may not want the cost and 
maintenance burden of a
+  separate OAuth server.
+
+To address these cases, Gravitino should provide an optional built-in local 
IdP mode with a simple
+username/password authentication flow.
+
+---
+
+## 2. Goals
+
+1. **Lower the barrier to entry**: allow users to evaluate and use Gravitino 
without deploying an
+   external IdP.
+
+2. **Support self-contained deployments**: provide a fully local 
authentication mechanism for
+   offline, air-gapped, and privacy-sensitive environments.
+
+3. **Keep the design intentionally simple**: optimize for POC and small 
deployment scenarios rather
+   than building a full-featured general-purpose identity platform.
+
+4. **Avoid vendor lock-in**: let users run Gravitino in environments where 
third-party IdPs are
+   impractical, undesirable, or cost-prohibitive.
+
+---
+
+## 3. Proposal
+
+### 3.1 Authentication Model
+
+The local IdP is introduced as a new Gravitino authenticator mode: **basic**.
+
+When enabled, Gravitino authenticates incoming requests through HTTP Basic 
authentication:
+
+```text
+Authorization: Basic <base64(username:password)>
+```
+
+This mode is intended for quick-start deployments and isolated environments. 
It should work out of
+the box with a minimal configuration and without any dependency on an external 
identity system.
+
+### 3.2 Why Basic Authentication
+
+The surveyed systems show that local authentication support typically 
converges on
+username/password-based flows. For Gravitino, simplicity matters more than 
protocol richness:
+
+- it shortens time-to-first-use,
+- it is easy to explain and operate,
+- it fits POC and offline scenarios well,
+- and it avoids introducing token lifecycle complexity into the server.
+
+For these reasons, the initial local IdP implementation uses:

Review Comment:
   Got I have been modified



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