Skip to content

Commit d1ad5de

Browse files
authored
Merge pull request #262603 from shikhagarg1/main
Fix the redirection uri content
2 parents 6c15bfa + 29bf7d8 commit d1ad5de

File tree

4 files changed

+26
-36
lines changed

4 files changed

+26
-36
lines changed

articles/energy-data-services/concepts-entitlements.md

Lines changed: 6 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -13,38 +13,31 @@ ms.custom: template-concept
1313

1414
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.
1515

16-
## OSDU Groups Structure
16+
## OSDU groups structure and naming
1717

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}`.
1919

2020
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.
2121

2222
The entitlements service enables three use cases for authorization:
2323

2424
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.
2626
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.
2727
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.
2828

2929
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.
3131
2. The service groups are **predefined** when OSDU services are provisioned in each data partition of Azure Data Manager for Energy instance.
3232
3. These groups enable `viewer`, `editor`, and `admin` access to call the OSDU APIs corresponding to the OSDU services.
3333

3434
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.
3636
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.
3838

3939
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.
4040

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-
4841
## Users
4942

5043
For each OSDU group, you can either add a user as an OWNER or a MEMBER.

articles/energy-data-services/how-to-generate-auth-token.md

Lines changed: 19 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -15,17 +15,13 @@ ms.custom: template-how-to
1515
In this article, you learn how to generate the service principal auth token, user's auth token and user's refresh token.
1616

1717
## 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.
2620

2721
:::image type="content" source="media/how-to-generate-auth-token/app-registration-uri.png" alt-text="Screenshot of adding URI to the app.":::
2822

23+
3. Fetch the `redirect-uri` (or reply URL) for your app to receive responses from Microsoft Entra ID.
24+
2925

3026
## Fetch parameters
3127
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
6763
:::image type="content" source="media/how-to-generate-auth-token/client-secret.png" alt-text="Screenshot of finding the client secret.":::
6864

6965
#### 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.
7269

7370
:::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.":::
7471

@@ -117,15 +114,21 @@ Generating a user's auth token is a two step process.
117114
### Get authorization code
118115
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.
119116

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.
122118
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.
126+
127+
#### Request format
128+
```bash
126129
https://login.microsoftonline.com/{tenant-id}/oauth2/v2.0/authorize?client_id={client-id}
127130
&response_type=code
128-
&redirect_uri=http%3a%2f%2flocalhost%3a8080
131+
&redirect_uri={redirect-uri}
129132
&response_mode=query
130133
&scope={client-id}%2f.default&state=12345&sso_reload=true
131134
```
@@ -141,15 +144,9 @@ The first step to getting an access token for many OpenID Connect (OIDC) and OAu
141144
| 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. |
142145

143146
#### 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.
146-
147147
```bash
148148
http://localhost:8080/?code=0.BRoAv4j5cvGGr0...au78f&state=12345&session....
149149
```
150-
3. Copy the response and fetch the text between `code=` and `&state`
151-
4. This is the `authorization_code` to keep handy for future use.
152-
153150
> [!NOTE]
154151
> The browser may say that the site can't be reached, but it should still have the authorization code in the URL bar.
155152

articles/energy-data-services/how-to-manage-users.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ In this article, you learn how to manage users and their memberships in OSDU gro
4444

4545
## Get the list of all available groups in a data partition
4646

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

4949
```bash
5050
curl --location --request GET "https://<URI>/api/entitlements/v2/groups/" \
17.2 KB
Loading

0 commit comments

Comments
 (0)