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: aspnetcore/security/authorization/secure-data.md
+21-14Lines changed: 21 additions & 14 deletions
Original file line number
Diff line number
Diff line change
@@ -3,7 +3,7 @@ title: Create an ASP.NET Core app with user data protected by authorization
3
3
author: rick-anderson
4
4
description: Learn how to create a Razor Pages app with user data protected by authorization. Includes HTTPS, authentication, security, ASP.NET Core Identity.
5
5
ms.author: riande
6
-
ms.date: 7/24/2018
6
+
ms.date: 12/07/2018
7
7
ms.custom: seodec18
8
8
uid: security/authorization/secure-data
9
9
---
@@ -277,25 +277,32 @@ See [this issue](https://github.com/aspnet/Docs/issues/8502) for information on:
277
277
278
278
## Test the completed app
279
279
280
+
If you haven't already set a password for seeded user accounts, use the [Secret Manager tool](xref:security/app-secrets#secret-manager) to set a password:
281
+
282
+
* Choose a strong password: Use eight or more characters and at least one upper-case character, number, and symbol. For example, `Passw0rd!` meets the strong password requirements.
283
+
* Execute the following command from the project's folder, where `<PW>` is the password:
284
+
285
+
```console
286
+
dotnet user-secrets set SeedUserPW <PW>
287
+
```
288
+
280
289
If the app has contacts:
281
290
282
-
* Delete all the records in the `Contact` table.
291
+
* Delete all of the records in the `Contact` table.
283
292
* Restart the app to seed the database.
284
293
285
-
Register a user for browsing the contacts.
286
-
287
-
An easy way to test the completed app is to launch three different browsers (or incognito/InPrivate versions). In one browser, register a new user (for example, `[email protected]`). Sign in to each browser with a different user. Verify the following operations:
294
+
An easy way to test the completed app is to launch three different browsers (or incognito/InPrivate sessions). In one browser, register a new user (for example, `[email protected]`). Sign in to each browser with a different user. Verify the following operations:
288
295
289
-
* Registered users can view all the approved contact data.
296
+
* Registered users can view all of the approved contact data.
290
297
* Registered users can edit/delete their own data.
291
-
* Managers can approve or reject contact data. The `Details` view shows **Approve** and **Reject** buttons.
292
-
* Administrators can approve/reject and edit/delete any data.
|[email protected]| Yes | Approve/reject and edit/delete all data. |
299
306
300
307
Create a contact in the administrator's browser. Copy the URL for delete and edit from the administrator contact. Paste these links into the test user's browser to verify the test user can't perform these operations.
Copy file name to clipboardExpand all lines: aspnetcore/security/authorization/secure-data/samples/final2.1/Pages/Error.cshtml
+5-2Lines changed: 5 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -16,8 +16,11 @@
16
16
17
17
<h3>Development Mode</h3>
18
18
<p>
19
-
Swapping to <strong>Development</strong> environment will display more detailed information about the error that occurred.
19
+
Swapping to the <strong>Development</strong> environment displays detailed information about the error that occurred.
20
20
</p>
21
21
<p>
22
-
<strong>Development environment should not be enabled in deployed applications</strong>, as it can result in sensitive information from exceptions being displayed to end users. For local debugging, development environment can be enabled by setting the <strong>ASPNETCORE_ENVIRONMENT</strong> environment variable to <strong>Development</strong>, and restarting the application.
22
+
<strong>The Development environment shouldn't be enabled for deployed applications.</strong>
23
+
It can result in displaying sensitive information from exceptions to end users.
24
+
For local debugging, enable the <strong>Development</strong> environment by setting the <strong>ASPNETCORE_ENVIRONMENT</strong> environment variable to <strong>Development</strong>
Copy file name to clipboardExpand all lines: aspnetcore/security/authorization/secure-data/samples/starter2.1/Pages/Error.cshtml
+5-2Lines changed: 5 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -16,8 +16,11 @@
16
16
17
17
<h3>Development Mode</h3>
18
18
<p>
19
-
Swapping to <strong>Development</strong> environment will display more detailed information about the error that occurred.
19
+
Swapping to the <strong>Development</strong> environment displays detailed information about the error that occurred.
20
20
</p>
21
21
<p>
22
-
<strong>Development environment should not be enabled in deployed applications</strong>, as it can result in sensitive information from exceptions being displayed to end users. For local debugging, development environment can be enabled by setting the <strong>ASPNETCORE_ENVIRONMENT</strong> environment variable to <strong>Development</strong>, and restarting the application.
22
+
<strong>The Development environment shouldn't be enabled for deployed applications.</strong>
23
+
It can result in displaying sensitive information from exceptions to end users.
24
+
For local debugging, enable the <strong>Development</strong> environment by setting the <strong>ASPNETCORE_ENVIRONMENT</strong> environment variable to <strong>Development</strong>
0 commit comments