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: api/v4/connectors/redis.md
+6-1Lines changed: 6 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,7 +1,12 @@
1
-
# Redis
1
+
# Redis/Valkey
2
2
3
3
This connector simplifies accessing [Redis](https://redis.io/) databases.
4
+
5
+
> [!NOTE]
6
+
> Redis has been updated to [Valkey](https://valkey.io/topics/migration/).
7
+
4
8
It supports the following .NET drivers:
9
+
5
10
-[StackExchange.Redis](https://www.nuget.org/packages/StackExchange.Redis), which provides an `IConnectionMultiplexer`.
6
11
-[Microsoft.Extensions.Caching.StackExchangeRedis](https://www.nuget.org/packages/Microsoft.Extensions.Caching.StackExchangeRedis), which provides an `IDistributedCache`.
Copy file name to clipboardExpand all lines: api/v4/security/certificate.md
+28-28Lines changed: 28 additions & 28 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -5,31 +5,31 @@ Certificate Authentication, also known as Mutual TLS, is a way for a client and
5
5
This library is a supplement to [ASP.NET Core Certificate Authentication](https://learn.microsoft.com/aspnet/core/security/authentication/certauth), adding functionality that helps you use [Cloud Foundry Instance Identity certificates](https://docs.cloudfoundry.org/devguide/deploy-apps/instance-identity.html) and authorization policies based on certificate data.
6
6
Additionally, resources are included for automatically generating certificates for local development that resemble what is found on the platform.
7
7
8
-
## Usage
8
+
## Using Mutual TLS in ASP.NET Core
9
9
10
-
In order to use this provider, the following steps are required:
10
+
To use this provider, the following steps are required:
11
11
12
-
1. Add NuGet package reference
13
-
1. Add identity certificates to the configuration
14
-
1. Add and use the security provider in the application
15
-
1. Secure your endpoints
16
-
1. Attach certificate to requests to secured endpoints
12
+
1. Add NuGet package reference.
13
+
1. Add identity certificates to the configuration.
14
+
1. Add and use the security provider in the application.
15
+
1. Secure your endpoints.
16
+
1. Attach certificate to requests to secured endpoints.
17
17
18
18
### Add NuGet Reference
19
19
20
20
> [!NOTE]
21
-
> This step is required on all applications that are sending or receiving certificate-authorized requests.
21
+
> This step is required for all applications that are sending or receiving certificate-authorized requests.
22
22
23
-
To use Certificate Authorization, you need to add a reference to the `Steeltoe.Security.Authorization.Certificate` NuGet package.
23
+
To use Certificate Authorization, add a reference to the `Steeltoe.Security.Authorization.Certificate` NuGet package.
24
24
25
25
### Add Identity Certificates to Configuration
26
26
27
27
> [!NOTE]
28
-
> This step is required on all applications that are sending or receiving certificate-authorized requests.
28
+
> This step is required for all applications that are sending or receiving certificate-authorized requests.
29
29
30
30
In a Cloud Foundry environment, instance identity certificates are automatically provisioned (and rotated on a regular basis) for each application instance.
31
31
Steeltoe provides the extension method `AddAppInstanceIdentityCertificate` to find the location of the certificate files from the environment variables `CF_INSTANCE_CERT` and `CF_INSTANCE_KEY`.
32
-
When running outside of Cloud Foundry, this method will automatically generate similar certificates.
32
+
When running outside of Cloud Foundry, this method automatically generates similar certificates.
33
33
Use the optional parameters to coordinate `orgId` and/or `spaceId` between your applications to facilitate communication when running outside of Cloud Foundry.
34
34
35
35
This code adds the certificate paths to the configuration for use later (and generates the instance identity certificate when running outside Cloud Foundry):
@@ -44,25 +44,25 @@ var builder = WebApplication.CreateBuilder(args);
When running locally, the code shown above will create a chain of self-signed certificates and the application instance identity certificate will have a subject containing an OrgId of `a8fef16f-94c0-49e3-aa0b-ced7c3da6229` and a SpaceId of `122b942a-d7b9-4839-b26e-836654b9785f`.
47
+
When running locally, the preceding code sample creates a chain of self-signed certificates. The application instance identity certificate is created with a subject containing an OrgId of `a8fef16f-94c0-49e3-aa0b-ced7c3da6229` and a SpaceId of `122b942a-d7b9-4839-b26e-836654b9785f`.
48
48
A root certificate and intermediate certificate are created on disk one level above the current project in a directory named `GeneratedCertificates`.
49
-
The root and intermediate certificates will automatically be shared between applications housed within the same solution, so that the applications will be able to trust each other.
49
+
The root and intermediate certificates are automatically shared between applications housed within the same solution, so that the applications can trust each other.
50
50
51
51
### Add and use Certificate Authentication
52
52
53
53
> [!NOTE]
54
-
> This section is only required on applications that are receiving certificate-authorized requests.
54
+
> This section is required only on applications that are receiving certificate-authorized requests.
55
55
56
56
Several steps need to happen before certificate authorization policies can be used to secure resources:
57
57
58
-
1.Configuration values need to be bound into named `CertificateOptions`
59
-
1. Certificate files need to be monitored for changes (to stay up to date when certificates are rotated)
60
-
1. Certificate forwarding needs to be configured (so that ASP.NET reads the certificate out of an HTTP Header)
61
-
1. Authentication services need to be added
62
-
1. Authorization services and policies need to be added
63
-
1. Middleware needs to be activated
58
+
1.Bind configuration values into named `CertificateOptions`.
59
+
2. Monitor certificate files for changes (to stay up to date when certificates are rotated).
60
+
3. Configure certificate forwarding (so that ASP.NET reads the certificate from an HTTP Header).
61
+
4. Add authentication services.
62
+
5. Add authorization services and policies.
63
+
6. Activate middleware.
64
64
65
-
Fortunately, all of the requirements can be satisfied with a handful of extension methods:
65
+
Fortunately, all of these requirements can be satisfied with a handful of extension methods:
> This step is only required on applications that are receiving certificate-authorized requests.
111
+
> This step is required only on applications that are receiving certificate-authorized requests.
112
112
113
-
As implied by the name of the extension method `AddOrgAndSpacePolicies` from the previous section on this page, Steeltoe provides policies for validating that a request came from an application in the same org and/or the same space. You can secure endpoints by using the standard ASP.NET Core `Authorize` attribute with these security policies.
113
+
As implied by the name of the extension method `AddOrgAndSpacePolicies`(from the previous section in this topic), Steeltoe provides policies for validating that a request came from an application in the same org and/or the same space. You can secure endpoints using the standard ASP.NET Core `Authorize` attribute with these security policies.
114
114
115
115
> [!NOTE]
116
-
> If needed, see the Microsoft documentation about [authorization in ASP.NET Core](https://learn.microsoft.com/aspnet/core/security/authorization/introduction) for a better understanding of how to use these attributes.
116
+
> For more information about authorization in ASP.NET Core, see the [Microsoft documentation](https://learn.microsoft.com/aspnet/core/security/authorization/introduction).
117
117
118
118
The following example shows a controller using the security attributes with the included policies:
119
119
@@ -153,18 +153,18 @@ In the preceding example, when an incoming request is made to the `SameOrgCheck`
153
153
154
154
### Communicating with Secured Services
155
155
156
-
In order to use app instance identity certificates in a client application, services need to be configured, but nothing needs to be activated in the ASP.NET Core request pipeline.
156
+
To use app instance identity certificates in a client application, services must be configured, but nothing needs to be activated in the ASP.NET Core request pipeline.
157
157
158
158
#### IHttpClientFactory integration
159
159
160
160
> [!NOTE]
161
-
> This step is only required on applications that are sending certificate-authorized requests.
161
+
> This step is required only on applications that are sending certificate-authorized requests.
162
162
163
-
For applications that need to send identity certificates in outgoing requests, Steeltoe provides a smooth experience through an extension method on `IHttpClientBuilder`named`AddAppInstanceIdentityCertificate`.
163
+
For applications that need to send identity certificates in outgoing requests, Steeltoe provides a smooth experience through an extension method on `IHttpClientBuilder`called`AddAppInstanceIdentityCertificate`.
164
164
This method invokes code that handles loading certificates from paths defined in the application's configuration, monitors those file paths and their content for changes, and places the certificate in an HTTP header named `X-Client-Cert` on all outbound requests.
165
165
166
166
> [!NOTE]
167
-
> If needed, see the Microsoft documentation about [IHttpClientFactory](https://learn.microsoft.com/aspnet/core/fundamentals/http-requests) for details.
167
+
> For more information about IHttpClientFactory, see the [Microsoft documentation](https://learn.microsoft.com/aspnet/core/fundamentals/http-requests).
0 commit comments