ExRam.Gremlinq 13.8.0
Changes
- Remove tests in DEBUG mode. (#2305)
- Individual coverage files per project. (#2303)
- Add extensions to configure AWSCredentials from the AWS SDK (#2302)
- Refine Copilot instructions (#2301)
- More explicit AI generated tests... (#2300)
- Switch back to coverlet code coverage now that coverlet.MTP is available (#2291)
New extension methods for configuring AWSCredentials from the AWS SDK (#2302)
This release adds first-class integration with the AWS SDK's AWSCredentials identity resolution infrastructure for the Neptune provider. Previously, IAM authentication required manually providing AccessKeyId and SecretAccessKey strings. Now you can leverage the AWS SDK's credential chain (IIdentityResolver<AWSCredentials>, DefaultAWSCredentialsIdentityResolver, or any AWSCredentials instance) to resolve credentials automatically.
The changes span two layers: the low-level signer extensions (Providers.Neptune) and the ASP.NET Core DI extensions (Providers.Neptune.AspNet).
New Extensions
1. WithCredentials — Configure signer from an AWSCredentials object
Resolves credentials synchronously from any AWS SDK AWSCredentials instance (e.g., BasicAWSCredentials, SessionAWSCredentials, AssumeRoleAWSCredentials).
```csharp name=WithCredentials.cs using Amazon.Runtime; using ExRam.Gremlinq.Providers.Neptune;
var signer = AWSSigner.EmptySigV4 .WithUri(new Uri("wss://my-neptune-cluster.us-east-1.neptune.amazonaws.com:8182")) .WithRegion("us-east-1") .WithCredentials(new BasicAWSCredentials("AKID", "SecretKey"));
#### 2. `WithCredentialsFrom` — Configure signer from an `IIdentityResolver<AWSCredentials>`
Resolves credentials from any custom or built-in `IIdentityResolver<AWSCredentials>`, with an optional `IClientConfig`.
```csharp name=WithCredentialsFrom.cs
using Amazon.Runtime;
using Amazon.Runtime.Identity;
using ExRam.Gremlinq.Providers.Neptune;
IIdentityResolver<AWSCredentials> myResolver = /* your custom resolver */;
var signer = AWSSigner.EmptySigV4
.WithUri(new Uri("wss://my-neptune-cluster.us-east-1.neptune.amazonaws.com:8182"))
.WithRegion("us-east-1")
.WithCredentialsFrom(myResolver);
3. WithCredentialsFromDefaultAWSCredentialsIdentityResolver — Use the AWS default credential chain
Uses DefaultAWSCredentialsIdentityResolver which walks the standard AWS credential chain (environment variables, AWS profiles, IMDS, ECS task roles, etc.).
```csharp name=WithCredentialsFromDefaultResolver.cs using ExRam.Gremlinq.Providers.Neptune;
var signer = AWSSigner.EmptySigV4 .WithUri(new Uri("wss://my-neptune-cluster.us-east-1.neptune.amazonaws.com:8182")) .WithRegion("us-east-1") .WithCredentialsFromDefaultAWSCredentialsIdentityResolver();
#### 4. `UseAWSCredentialsIdentityResolver` (ASP.NET Core DI) — Register a custom identity resolver
Registers a specific `IIdentityResolver<AWSCredentials>` as a singleton in the DI container. When `UseIAMAuthentication` is called, it will prefer this resolver over config-based `AccessKeyId`/`SecretAccessKey`.
```csharp name=UseAWSCredentialsIdentityResolver.cs
using Amazon.Runtime;
using Amazon.Runtime.Identity;
using ExRam.Gremlinq.Providers.Neptune.AspNet;
// In Startup / Program.cs
builder.Services
.AddGremlinq(setup => setup
.UseNeptune<Vertex, Edge>()
.UseAWSCredentialsIdentityResolver(myCustomResolver)
.UseIAMAuthentication());
5. UseDefaultAWSCredentialsIdentityResolver (ASP.NET Core DI) — Register the default AWS credential chain
Convenience shorthand that registers DefaultAWSCredentialsIdentityResolver into DI.
```csharp name=UseDefaultAWSCredentialsIdentityResolver.cs using ExRam.Gremlinq.Providers.Neptune.AspNet;
builder.Services
.AddGremlinq(setup => setup
.UseNeptune#### 6. `UseIAMAuthentication(IClientConfig)` (ASP.NET Core DI) — IAM auth with client config
A new overload of `UseIAMAuthentication` that accepts an `IClientConfig`, passed through to the identity resolver when resolving credentials.
```csharp name=UseIAMAuthenticationWithClientConfig.cs
using Amazon.Runtime;
using ExRam.Gremlinq.Providers.Neptune.AspNet;
var clientConfig = new AmazonNeptunedataConfig { RegionEndpoint = RegionEndpoint.USEast1 };
builder.Services
.AddGremlinq(setup => setup
.UseNeptune<Vertex, Edge>()
.UseDefaultAWSCredentialsIdentityResolver()
.UseIAMAuthentication(clientConfig));