-
Notifications
You must be signed in to change notification settings - Fork 332
Document the Concept of realm Issue apache#1326 #1478
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
afeb2a9
9a060b2
b043922
874b1e1
e33eb21
d6fbafa
9b18243
10db8fd
a3c940f
8e83a37
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
| @@ -0,0 +1,53 @@ | ||||||
| --- | ||||||
| # | ||||||
| # 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. | ||||||
| # | ||||||
| Title: Realm | ||||||
| type: docs | ||||||
| weight: 350 | ||||||
| --- | ||||||
|
|
||||||
| This page explains what a realm is and what it is used for in Polaris. | ||||||
|
|
||||||
| ### What is it? | ||||||
|
|
||||||
| A realm in Polaris serves as logical partitioning mechanism within the catalog system. This isolation allows for multitenancy, enabling different teams, environments or organizations to operate independently within the same Polaris deployment. | ||||||
|
|
||||||
| ### Key Characteristics | ||||||
|
|
||||||
| **Isolation:** Each realm encapsulates its own set of resources, ensuring that operations, policies in one realm do not affect others. | ||||||
|
|
||||||
| **Authentication Context:** When configuring Polaris, principals credentials are associated with a specific realm. This allows for the separation of security concerns across different realms. | ||||||
|
|
||||||
| **Configuration Scope:** Realm identifiers are used in various configurations, such as connection strings feature configurations, etc. | ||||||
|
|
||||||
| An example of this is: | ||||||
|
|
||||||
| `jdbc:postgresql://localhost:5432/{realm} | ||||||
| ` | ||||||
| This ensures that each realm's data is stored separately. | ||||||
|
|
||||||
| ### How is it used in the system? | ||||||
|
|
||||||
| **RealmContext:** It is a key concept used to identify and resolve the context in which operations are performed. For example `DefaultRealmContextResolver`, a realm is resolved from request headers, and operations are performed based on the resolved realm identifier. | ||||||
|
|
||||||
| **Authentication and Authorization:** For example, in `BasePolarisAuthenticator`, `RealmContext` is used to provide context about the current security domain, which is used to retrieve the correct `PolarisMetastoreManager` that manages all Polaris entities and associated grant records metadata for | ||||||
| authorization. | ||||||
|
|
||||||
| **Isolation:** In methods like `createEntityManagerFactory(@Nonnull RealmContext realmContext)` from `PolarisEclipseLinkPersistenceUnit` interface, the realm context influence how resources are created or managed based on the security policies of that realm. | ||||||
|
||||||
| **Isolation:** In methods like `createEntityManagerFactory(@Nonnull RealmContext realmContext)` from `PolarisEclipseLinkPersistenceUnit` interface, the realm context influence how resources are created or managed based on the security policies of that realm. | |
| **Isolation:** In the persistence layer, the realm context influences how resources are created or managed based on the security policies of that realm. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add
**Persistence:** Some implementations of Polaris Persistence may use realm IDs in primary keys for Polaris data.I believe it is important to inform uses of this aspect.