Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Egress providers - S3 store] Add support for service accounts when running dotnet monitor in kubernetes #6626

Merged
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Directory.Packages.props
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<Project>
<ItemGroup>
<PackageVersion Include="AWSSDK.S3" Version="$(AwsSdkS3Version)" />
<PackageVersion Include="AWSSDK.SecurityToken" Version="$(AwsSdkSecurityTokenVersion)" />
<PackageVersion Include="Azure.Identity" Version="$(AzureIdentityVersion)" />
<PackageVersion Include="Azure.Storage.Blobs" Version="$(AzureStorageBlobsVersion)" />
<PackageVersion Include="Azure.Storage.Queues" Version="$(AzureStorageQueuesVersion)" />
Expand Down
8 changes: 8 additions & 0 deletions documentation/configuration/egress-configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,14 @@
```
</details>

### Authenticating to S3 using service accounts
If running workloads in kubernetes it is common to authenticate with AWS via kubernetes service accounts ([AWS Documentation](https://docs.aws.amazon.com/eks/latest/userguide/pod-configuration.html)). This is supported in dotnet monitor if none of: `accessKeyId`, `secretAccessKey`, `awsProfileName` are specified. In this case dotnet monitor will fallback to load credentials to login using AWS default defined environment variables, this means that workloads running in EKS can utilise service accounts as discussed in the above AWS documentation.

Check failure on line 202 in documentation/configuration/egress-configuration.md

View workflow job for this annotation

GitHub Actions / Spellcheck

Unknown word (utilise)
jwreford99 marked this conversation as resolved.
Show resolved Hide resolved

Specifically the use of service accounts set the following environment variables which are detected by AWS SDK and used for authentication as a fallback:
- AWS_REGION
- AWS_ROLE_ARN
- AWS_WEB_IDENTITY_TOKEN_FILE

## Filesystem egress provider

| Name | Type | Description |
Expand Down
1 change: 1 addition & 0 deletions eng/dependabot/independent/Packages.props
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,6 @@
<PackageReference Include="Swashbuckle.AspNetCore" Version="$(SwashbuckleAspNetCoreVersion)" />
<PackageReference Include="Moq" Version="$(MoqVersion)" />
<PackageReference Include="AWSSDK.S3" Version="$(AwsSdkS3Version)" />
<PackageReference Include="AWSSDK.SecurityToken" Version="$(AwsSdkSecurityTokenVersion)" />
</ItemGroup>
</Project>
1 change: 1 addition & 0 deletions eng/dependabot/independent/Versions.props
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
<NJsonSchemaVersion>11.0.0</NJsonSchemaVersion>
<SwashbuckleAspNetCoreVersion>6.5.0</SwashbuckleAspNetCoreVersion>
<AwsSdkS3Version>3.7.305.7</AwsSdkS3Version>
<AwsSdkSecurityTokenVersion>3.7.300.33</AwsSdkSecurityTokenVersion>

<!--
Moq version & constants derived from Moq.
Expand Down
3 changes: 2 additions & 1 deletion src/Extensions/S3Storage/S3Storage.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,13 @@

<ItemGroup>
<PackageReference Include="AWSSDK.S3" />
<PackageReference Include="AWSSDK.SecurityToken" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\..\Microsoft.Diagnostics.Monitoring.Extension.Common\Microsoft.Diagnostics.Monitoring.Extension.Common.csproj" />
</ItemGroup>

<ItemGroup>
<Compile Update="OptionsDisplayStrings.Designer.cs">
<DependentUpon>OptionsDisplayStrings.resx</DependentUpon>
Expand Down
Loading