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: README.md
+11-36Lines changed: 11 additions & 36 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -25,8 +25,8 @@ Use this reference code to get started on building a [SCIM](https://docs.microso
25
25
26
26
Use the repository **[Wiki](https://github.com/AzureAD/SCIMReferenceCode/wiki)** for guidance on how to use this reference.
27
27
28
-
> [!NOTE]
29
-
> This code is intended to help you get started building your SCIM endpoint and is provided "AS IS." It is intended as a reference and there is no guarantee of it being actively maintained or supported.
28
+
> **[NOTE]**
29
+
> This code is intended to help you get started building your SCIM endpoint and is provided "AS IS." It is intended as a reference and there is no guarantee of it being actively maintained or supported.
30
30
31
31
## Capabilities
32
32
@@ -40,7 +40,7 @@ Use the repository **[Wiki](https://github.com/AzureAD/SCIMReferenceCode/wiki)**
40
40
41
41
## Getting Started
42
42
43
-
The `Microsoft.SystemForCrossDomainIdentityManagement` project contains the code base for building a SCIM API. The `Microsoft.SCIM.Sample` project is there as a sample for using the project. A step by step guide for starting up with the project can be found [here](docs/get-started.md)
43
+
The `Microsoft.SystemForCrossDomainIdentityManagement` project contains the code base for building a SCIM API. The `Microsoft.SCIM.WebHostSample` project is there as a sample for using the project. A step by step guide for starting up with the project can be found [here](docs/get-started.md)
44
44
45
45
## Navigating the reference code
46
46
@@ -49,14 +49,10 @@ This reference code was developed as a .Net core MVC web API for SCIM provisioni
49
49
1. The **Schemas** folder includes:
50
50
* The models for the User and Group resources along with some abstract classes like Schematized for shared functionality.
51
51
* An Attributes folder which contains the class definitions for complex attributes of Users and Groups such as addresses.
52
-
2. The **Controllers** folder contains:
53
-
* The controllers for the various SCIM endpoints. Resource controllers include HTTP verbs to perform CRUD operations on the resource (GET, POST, PUT, PATCH, DELETE).
54
-
* Controllers rely on services to perform the actions.
55
-
3. The **Services** folder contains logic for actions relating to the way resources are queried and updated.
56
-
* The service methods are exposed via the IProviderService interface.
52
+
2. The **Service** folder contains logic for actions relating to the way resources are queried and updated.
57
53
* The reference code has services to return users and groups.
58
-
* The services are based on Entity Framework and DbContext is defined by the class ScimContext.
59
-
4. The **Protocol** folder contains logic for actions relating to the way resources are returned according to the SCIM RFC such as:
54
+
* The **controllers** folder contains the various SCIM endpoints. Resource controllers include HTTP verbs to perform CRUD operations on the resource (GET, POST, PUT, PATCH, DELETE). Controllers rely on services to perform the actions.
55
+
3. The **Protocol** folder contains logic for actions relating to the way resources are returned according to the SCIM RFC such as:
60
56
* Returning multiple resources as a list.
61
57
* Returning only specific resources based on a filter.
62
58
* Turning a query into a list of linked lists of single filters.
@@ -67,42 +63,21 @@ This reference code was developed as a .Net core MVC web API for SCIM provisioni
|`Microsoft.SCIM.WebHostSample`| Sample implementation of the SCIM library.|
72
68
|`.gitignore`| Define what to ignore at commit time. |
73
69
|`CHANGELOG.md`| List of changes to the sample. |
74
70
|`CONTRIBUTING.md`| Guidelines for contributing to the sample. |
75
71
|`README.md`| This README file. |
76
72
|`LICENSE`| The license for the sample. |
77
73
78
-
## Common scenarios
79
-
80
-
|Scenario|How-to|
81
-
|---|---|
82
-
|Enable or disable authorization|**Steps**<br/>1. Navigate to the **UsersController.cs** or **GroupController.cs** files located in **ScimReferenceApi > Controllers**.<br/>2. Comment or uncomment out the authorize command.|
83
-
|Add additional filterable attributes|**Steps**<br/>1. Navigate to the **FilterUsers.cs** or **FilterGroups.cs** files located in **ScimReferenceApi > Protocol**.<br/>2. Update the method to include the attributes that you would like to support filtering for. |
84
-
|Support additional user resource extensions|**Steps**<br/>1. Copy the **EnterpriseUser.cs** file located in **ScimReferenceApi > Schemas**.<br/>2. Rename the class to your custom extension name (e.g. customExtensionName.cs)<br/>3. Update the schema to match the desired naming convention.<br/>4. Repeat steps 1 - 3 with the **EnterpriseAttributes.cs** file (located in ScimReferenceApi > Schemas > Attributes) and update it with the attributes that you need.|
85
-
86
74
## Authorization
87
75
88
-
The SCIM standard leaves authentication and authorization relatively open. You could use cookies, basic authentication, TLS client authentication, or any of the other methods listed [here](https://tools.ietf.org/html/rfc7644#section-2). You should take into consideration security and industry best practices when choosing an authentication/authorization method. Avoid insecure methods such as username and password in favor of more secure methods such as OAuth. Azure AD supports long-lived bearer tokens (for gallery and non-gallery applications) as well as the OAuth authorization grant (for applications published in the app gallery). This reference code allows you to either turn authorization off to simplify testing, generate a bearer token, or bring your own bearer token.
89
-
90
-
**Option 1**: Turn off authorization (this should only be used for testing)
91
-
* Navigate to the **UsersController.cs** or **GroupController.cs** files located in **ScimReferenceApi > Controllers**.<br/>2. Comment out the authorize command.
92
-
93
-
**Option 2**: Get a bearer token signed by Microsoft security bearer (should only be used for testing, not in production)
94
-
* Post to to the key endpoint with the string "SecureLogin" to retrieve a token. The token is valid for 120 minutes (the validity can be changed in the key controller).
76
+
The SCIM standard leaves authentication and authorization relatively open. You could use cookies, basic authentication, TLS client authentication, or any of the other methods listed [here](https://tools.ietf.org/html/rfc7644#section-2). You should take into consideration security and industry best practices when choosing an authentication/authorization method. Avoid insecure methods such as username and password in favor of more secure methods such as OAuth. Azure AD supports long-lived bearer tokens (for gallery and non-gallery applications) as well as the OAuth authorization grant (for applications published in the app gallery). This reference code allows you to either leverage the token that Azure AD provides or generate a token when testing locally. Review the [wiki](https://github.com/AzureAD/SCIMReferenceCode/wiki/Authorization) for more details.
95
77
96
-
**Option 3**: Bring your own token
97
-
***Option 3a**: Generate your own token that matches the specifications of the reference code.
98
-
* By default the issuer, audience, and signer must be "Microsoft.Security.Bearer"
99
-
* These are defaults to get started testing quickly. They should not be relied on in production.
100
-
***Option 3b**: Generate your own token and update the specifications of the reference code to match your token.
101
-
* Change the specifications in the configure service section of the startup.cs class.
102
-
* Specify the authorization settings you would like to validate.
103
-
* Generate a token on your own that matches those specifications.
78
+
> **[NOTE]**
79
+
> These options are solely for testing. You will want to generate your own token when integrating with Azure AD.
104
80
105
-
Provided below are test cases that you can use to ensure that your SCIM endpoint is compliant with the SCIM RFC.
0 commit comments