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: articles/energy-data-services/concepts-entitlements.md
+6-13Lines changed: 6 additions & 13 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -13,38 +13,31 @@ ms.custom: template-concept
13
13
14
14
Access management is a critical function for any service or resource. The entitlement service lets you control who can use your Azure Data Manager for Energy, what they can see or change, and which services or data they can use.
15
15
16
-
## OSDU Groups Structure
16
+
## OSDU groups structure and naming
17
17
18
-
The entitlements service of Azure Data Manager for Energy allows you to create groups and manage memberships of the groups. An entitlement group defines permissions on services/data sources for a given data partition in your Azure Data Manager for Energy instance. Users added to a given group obtain the associated permissions.
18
+
The entitlements service of Azure Data Manager for Energy allows you to create groups and manage memberships of the groups. An entitlement group defines permissions on services/data sources for a given data partition in your Azure Data Manager for Energy instance. Users added to a given group obtain the associated permissions. All group identifiers (emails) are of form `{groupType}.{serviceName|resourceName}.{permission}@{partition}.{domain}`.
19
19
20
20
Please note that different groups and associated user entitlements need to be set for every **new data partition** even in the same Azure Data Manager for Energy instance.
21
21
22
22
The entitlements service enables three use cases for authorization:
23
23
24
24
1.**Data groups** are used to enable authorization for data.
25
-
1.Some examples are data.welldb.viewers and data.welldb.owners.
25
+
1.The data groups start with the word "data." such as data.welldb.viewers and data.welldb.owners.
26
26
2. Individual users are added to the data groups which are added in the ACL of individual data records to enable `viewer` and `owner` access of the data once the data has been loaded in the system.
27
27
3. To `upload` the data, you need to have entitlements of various OSDU services which are used during ingestion process. The combination of OSDU services depends on the method of ingestion. E.g., for manifest ingestion, refer [this](concepts-manifest-ingestion.md) to understand the OSDU services APIs used. The user **need not be part of the ACL** to upload the data.
28
28
29
29
2.**Service groups** are used to enable authorization for services.
30
-
1.Some examples are service.storage.user and service.storage.admin.
30
+
1.The service groups start with the word "service." such as service.storage.user and service.storage.admin.
31
31
2. The service groups are **predefined** when OSDU services are provisioned in each data partition of Azure Data Manager for Energy instance.
32
32
3. These groups enable `viewer`, `editor`, and `admin` access to call the OSDU APIs corresponding to the OSDU services.
33
33
34
34
3.**User groups** are used for hierarchical grouping of user and service groups.
35
-
1.Some examples are users.datalake.viewers and users.datalake.editors.
35
+
1.The service groups start with the word "users." such as users.datalake.viewers and users.datalake.editors.
36
36
2. Some user groups are created by default when a data partition is provisioned. Details of these groups and their hierarchy scope are in [Bootstrapped OSDU Entitlements Groups](https://community.opengroup.org/osdu/platform/deployment-and-operations/infra-azure-provisioning/-/blob/master/docs/osdu-entitlement-roles.md).
37
-
3.The `users@{partition}.{domain}` has the list of all the users with any type of access in a given data partition. Before adding a new user to any entitlement groups, you need to add the new user to the `users@{partition}.{domain}` group as well.
37
+
3.There's one exception of this group naming rule for "users" group. It gets created when a new data partition is provisioned and its name follows the pattern of `users@{partition}.{domain}`. It has the list of all the users with any type of access in a given data partition. Before adding a new user to any entitlement groups, you need to add the new user to the `users@{partition}.{domain}` group as well.
38
38
39
39
Individual users can be added to a `user group`. The `user group` is then added to a `data group`. The data group is added to the ACL of the data record. It enables abstraction for the data groups since individual users need not be added one by one to the data group and instead can be added to the `user group`. This `user group` can then be used repeatedly for multiple `data groups`. The nested structure thus helps provide scalability to manage memberships in OSDU.
40
40
41
-
## Group naming
42
-
43
-
All group identifiers (emails) are of form `{groupType}.{serviceName|resourceName}.{permission}@{partition}.{domain}`. A group naming convention is adopted by OSDU such that the group's name starts with
44
-
1. the word "data." for data groups;
45
-
2. the word "service." for service groups;
46
-
3. the word "users." for user groups. There's one exception of this group naming rule for "users" group. It gets created when a new data partition is provisioned and its name follows the pattern of `users@{partition}.{domain}`.
47
-
48
41
## Users
49
42
50
43
For each OSDU group, you can either add a user as an OWNER or a MEMBER.
Copy file name to clipboardExpand all lines: articles/energy-data-services/how-to-generate-auth-token.md
+19-22Lines changed: 19 additions & 22 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -15,17 +15,13 @@ ms.custom: template-how-to
15
15
In this article, you learn how to generate the service principal auth token, user's auth token and user's refresh token.
16
16
17
17
## Register your app with Microsoft Entra ID
18
-
To use the Azure Data Manager for Energy platform endpoint, you must register your app in the [Azure portal app registration page](https://go.microsoft.com/fwlink/?linkid=2083908). You can use either a Microsoft account or a work or school account to register an app. For steps on how to configure, see [Register your app documentation](../active-directory/develop/quickstart-register-app.md#register-an-application).
19
-
20
-
To use the OAuth 2.0 authorization code grant flow, save the following values when registering the app:
21
-
22
-
- The `Directory (tenant) ID` is used as `{tenant-id}`
23
-
- The `application (client) ID` assigned by the app registration portal is used as `client-id`.
24
-
- A `client (application) secret`, either a password or a public/private key pair (certificate). The client secret isn't required for native apps. This secret is used as `{client-secret}`.
25
-
- A `redirect URI (or reply URL)` for your app to receive responses from Microsoft Entra ID. If there's no redirect URIs specified, you can add a platform, select "Web", add `http://localhost:8080`, and select save.
18
+
1. To provision the Azure Data Manager for Energy platform, you must register your app in the [Azure portal app registration page](https://go.microsoft.com/fwlink/?linkid=2083908). You can use either a Microsoft account or a work or school account to register an app. For steps on how to configure, see [Register your app documentation](../active-directory/develop/quickstart-register-app.md#register-an-application).
19
+
2. In the app overview section, if there's no redirect URIs specified, you can add a platform, select "Web", add `http://localhost:8080`, and select save.
26
20
27
21
:::image type="content" source="media/how-to-generate-auth-token/app-registration-uri.png" alt-text="Screenshot of adding URI to the app.":::
28
22
23
+
3. Fetch the `redirect-uri` (or reply URL) for your app to receive responses from Microsoft Entra ID.
24
+
29
25
30
26
## Fetch parameters
31
27
You can also find the parameters once the app is registered on the Azure portal.
@@ -67,8 +63,9 @@ A `client-secret` is a string value your app can use in place of a certificate t
67
63
:::image type="content" source="media/how-to-generate-auth-token/client-secret.png" alt-text="Screenshot of finding the client secret.":::
68
64
69
65
#### Find the `URL` for your Azure Data Manager for Energy instance
70
-
1. Navigate to your Azure Data Manager for Energy *Overview* page on the Azure portal.
71
-
2. Copy the URI from the essentials pane.
66
+
1. Create [Azure Data Manager for Energy instance](quickstart-create-microsoft-energy-data-services-instance.md).
67
+
2. Navigate to your Azure Data Manager for Energy *Overview* page on the Azure portal.
68
+
3. Copy the URI from the essentials pane.
72
69
73
70
:::image type="content" source="media/how-to-generate-auth-token/endpoint-url.png" alt-text="Screenshot of finding the URL from Azure Data Manager for Energy instance.":::
74
71
@@ -117,15 +114,21 @@ Generating a user's auth token is a two step process.
117
114
### Get authorization code
118
115
The first step to getting an access token for many OpenID Connect (OIDC) and OAuth 2.0 flows is to redirect the user to the Microsoft identity platform `/authorize` endpoint. Microsoft Entra ID signs the user in and requests their consent for the permissions your app requests. In the authorization code grant flow, after consent is obtained, Microsoft Entra ID returns an `authorization_code` to your app that it can redeem at the Microsoft identity platform `/token` endpoint for an access token.
119
116
120
-
#### Request format
121
-
1. After replacing the parameters, you can paste the below in the URL of any browser and hit enter.
117
+
1. After replacing the parameters, you can paste the request in the URL of any browser and hit enter.
122
118
2. It asks you to log in to your Azure portal if not logged in already.
123
-
3. You get the response in the URL.
124
-
125
-
```bash
119
+
3. You might see 'can't reach this page' error in the browser. You can ignore that.
120
+
121
+
:::image type="content" source="media/how-to-generate-auth-token/localhost-redirection-error.png" alt-text="Screenshot of localhost redirection.":::
122
+
123
+
4. The browser redirects to `http://localhost:8080/?code={authorization code}&state=...` upon successful authentication.
124
+
5. Copy the response from the URL bar of the browser and fetch the text between `code=` and `&state`
125
+
6. This is the `authorization_code` to keep handy for future use.
@@ -141,15 +144,9 @@ The first step to getting an access token for many OpenID Connect (OIDC) and OAu
141
144
| state |Recommended |A value included in the request that can be a string of any content that you want to use. Usually, a randomly generated unique value is used, to prevent cross-site request forgery attacks. The state also is used to encode information about the user's state in the app before the authentication request occurred. For example, the page the user was on, or the user flow that was being executed. |
142
145
143
146
#### Sample response
144
-
1. The browser redirects to `http://localhost:8080/?code={authorization code}&state=...` upon successful authentication.
145
-
2. In the URL bar, you see the response of the below format.
Copy file name to clipboardExpand all lines: articles/energy-data-services/how-to-manage-users.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -44,7 +44,7 @@ In this article, you learn how to manage users and their memberships in OSDU gro
44
44
45
45
## Get the list of all available groups in a data partition
46
46
47
-
Run the below curl command in Azure Cloud Bash to get all the groups that are available for your Azure Data Manager for the Energy instance and its data partitions.
47
+
Run the below curl command in Azure Cloud Bash to get all the groups that are available for you or you have access to in the given data partition of Azure Data Manager for the Energy instance.
48
48
49
49
```bash
50
50
curl --location --request GET "https://<URI>/api/entitlements/v2/groups/" \
0 commit comments