You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: site/content/in-dev/unreleased/realm.md
+20-16
Original file line number
Diff line number
Diff line change
@@ -26,32 +26,36 @@ This page explains what a realm is and what it is used for in Polaris.
26
26
27
27
### What is it?
28
28
29
-
A realm in software systems often refers to a security or authentication domain. It represents a boundary within which security policies and isolation mechanisms are applied and enforced. <br/>
30
-
In the context of applications, a realm could define a scope for managing user identities, authentication, and authorization. <br/>
31
-
To be more specific, a realm in Polaris represents an isolated "universe" within the system, such as different deployments, environments, regions or distinct accounts. <br/>
32
-
Realms serve as a way to partition and manage data and services, ensuring that operations are performed within the correct logical context. <br/>
33
-
Every REST request has a realm associated with it. If not specified the default realm is used (POLARIS). Refer to [Configuration]({{% ref "configuration" %}}) for more details.
29
+
A realm in Polaris serves as logical partitioning mechanism within the catalog system. This isolation allows for multitenancy, enabling different teams, environment or organizations to operate independently within the same Polaris deployment.
34
30
35
-
### What problem does it solve?
31
+
### Key Characteristics
36
32
37
-
**Security Management:**By defining a realm, systems can manage authentication and authorization in a modular and organized way. It allows for the separation of security concerns and the application of policies specific to different areas of an application. <br/>
33
+
**Isolation:**Each realm encapsulates its own set of resources, ensuring that operations, security breaches or policies in one realm do not affect others.
38
34
39
-
**Scalability:**Realms help manage users and roles across different services or modules, providing flexibility and scalability. <br/>
35
+
**Authentication Context:**When configuring Polaris, credentials are associated with a specific realm. This allows for the separation of security concerns across different realms.
40
36
41
-
**Isolation:** Realms can isolate different parts of a system, ensuring that security breaches or policies in one realm do not affect others.
37
+
For example:
42
38
43
-
### How is it used in the system?
39
+
`./gradlesw run -Dpolaris.bootstrap.credentials=POLARIS,root,secret
40
+
`
41
+
In this case POLARIS is the realm, root is the clientID and secret is the client secret.
44
42
45
-
**Authentication and Authorization:**For example, in `BasePolarisAuthenticator`, `RealmContext` is used to provide context about the current security domain, which can be crucial for authenticating users or services. <br/>
43
+
**ConfigurationScope:**Realm identifiers are used in various configurations, such as database paths:
46
44
47
-
**Configuration:** Realms are configured to specify which users or services are allowed to access resources or perform certain actions. <br/>
45
+
For example:
48
46
49
-
**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. <br/>
50
-
An example of this is the way a realm name is used to create a database connection url so that you have one database instance per realm.
This ensures that each realm's data is stored separately.
51
50
52
-
**RealmContext:** It is a key concept used to identify and resolve the context in which operations are performed. For example, in `DefaultRealmContextResolver`, a realm is resolved from request headers, and operations are performed based on the resolved realm identifier. <br/>
51
+
### How is it used in the system?
53
52
54
-
**MetaStore and Cache Management:** Realms are used to manage different instances or configurations of meta stores and caches. For instance, in `LocalPolarisMetaStoreManagerFactory`, realms help in segregating data per realm.
53
+
**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
54
+
authorization.
55
55
56
+
**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.
57
+
An example of this is the way a realm name is used to create a database connection url so that you have one database instance per realm, or it can be more granular and applied at primary key level (within the same database instance).
56
58
59
+
**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.
57
60
61
+
**MetaStore and Cache Management:** Realms are used to manage different instances or configurations of metadata stores and caches. An example of this is `LocalPolarisMetaStoreManagerFactory`.
0 commit comments