Skip to content

Commit

Permalink
Merge branch 'release/2.19.6'
Browse files Browse the repository at this point in the history
  • Loading branch information
emmanuelmathot committed Feb 27, 2024
2 parents 4012452 + da25d1f commit 9c48734
Show file tree
Hide file tree
Showing 9 changed files with 36 additions and 7 deletions.
2 changes: 1 addition & 1 deletion src/Stars.Console/Terradue.Stars.Console.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFrameworks>net6.0</TargetFrameworks>
<Version>2.19.5</Version>
<Version>2.19.6</Version>
<!-- <VersionSuffix>beta.8</VersionSuffix> -->
<Description>Stars is a CLI for working with Spatio Temporal Catalog such as STAC but not only</Description>
<Version Condition=" '$(VersionSuffix)' != '' ">$(Version)-$(VersionSuffix)</Version>
Expand Down
2 changes: 1 addition & 1 deletion src/Stars.Data/Terradue.Stars.Data.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<ProjectName>Terradue.Stars.Data</ProjectName>
<Title>Terradue.Stars.Data</Title>
<Description>Collection of data Plugins for Terradue.Stars</Description>
<Version>2.19.5</Version>
<Version>2.19.6</Version>
<!-- <VersionSuffix>beta.8</VersionSuffix> -->
<Version Condition=" '$(VersionSuffix)' != '' ">$(Version)-$(VersionSuffix)</Version>
<NoWarn>NU1603</NoWarn>
Expand Down
2 changes: 1 addition & 1 deletion src/Stars.Data/ThirdParty/Publication/GeosquareService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ public async Task<IPublicationState> PublishAsync(IPublicationModel publicationM
return state;
}

private HttpClient CreateClient(string catalogId)
public HttpClient CreateClient(string catalogId)
{
HttpClient client = httpClientFactory.CreateClient(catalogId);
if (client.BaseAddress == null)
Expand Down
2 changes: 1 addition & 1 deletion src/Stars.Services/Resources/AmazonCustomS3Config.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

namespace Terradue.Stars.Services.Resources
{
internal class AmazonCustomS3Config : AmazonS3Config
public class AmazonCustomS3Config : AmazonS3Config
{
private string _region;
private string _serviceURL;
Expand Down
1 change: 1 addition & 0 deletions src/Stars.Services/Resources/IS3ClientFactory.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ public interface IS3ClientFactory
{
IAmazonS3 CreateS3Client(S3Url s3Url);
IAmazonS3 CreateS3Client(IAsset asset);
IAmazonS3 CreateS3Client(S3Configuration s3Config);
Task<IAmazonS3> CreateS3ClientAsync(S3Url url, IIdentityProvider identityProvider, string policy = null);
AWSCredentials GetConfiguredCredentials(S3Url s3Url, IIdentityProvider identityProvider = null);
IAmazonS3 CreateS3Client(string name);
Expand Down
2 changes: 1 addition & 1 deletion src/Stars.Services/Resources/S3ClientFactory.cs
Original file line number Diff line number Diff line change
Expand Up @@ -297,7 +297,7 @@ public S3Configuration GetAmazonS3Config(S3Url s3Url)
/// </summary>
/// <param name="options"></param>
/// <returns></returns>
private static AmazonCustomS3Config CreateS3Configuration(AWSOptions options)
public static AmazonCustomS3Config CreateS3Configuration(AWSOptions options)
{
AmazonCustomS3Config config = new AmazonCustomS3Config();

Expand Down
28 changes: 28 additions & 0 deletions src/Stars.Services/Resources/S3Options.cs
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,34 @@ public S3Configuration(S3Configuration s3Configuration)
this.UseWebIdentity = s3Configuration == null ? false : s3Configuration.UseWebIdentity;
}

/// <summary>
/// Create a new S3Configuration from original AmazonS3Config and AWSCredentials
/// This is useful when you want to create a new S3Configuration from an existing AmazonS3Config and AWSCredentials
/// and leverage the modification to access a custom S3 service by using IS3ClientFactory
/// </summary>
/// <param name="amazonS3Config"></param>
/// <param name="awsCredentials"></param>
/// <returns></returns>
public static S3Configuration Create(AmazonS3Config amazonS3Config, AWSCredentials awsCredentials)
{
return new S3Configuration
{
AmazonS3Config = amazonS3Config,
AWSCredentials = awsCredentials,
UrlPattern = $".*", // match all
Region = amazonS3Config?.RegionEndpoint?.SystemName,
ServiceURL = amazonS3Config?.ServiceURL,
AccessKey = awsCredentials?.GetCredentials()?.AccessKey,
SecretKey = awsCredentials?.GetCredentials()?.SecretKey,
SessionToken = awsCredentials?.GetCredentials()?.Token,
AuthenticationRegion = amazonS3Config?.AuthenticationRegion,
UseHttp = amazonS3Config?.UseHttp ?? false,
ForcePathStyle = amazonS3Config?.ForcePathStyle ?? false,
TryAdaptRegion = true,
UseWebIdentity = false
};
}

public string UrlPattern { get; set; }
public string ServiceURL { get; set; }
public string AccessKey { get; set; }
Expand Down
2 changes: 1 addition & 1 deletion src/Stars.Services/Router/GenericCatalog.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ public GenericCatalog(IEnumerable<IResource> routes, string id)

public string Title => id;

public ContentType ContentType => new ContentType("application/catalog");
public ContentType ContentType => new ContentType("application/atom+xml");

public Uri Uri => new Uri("stars://catalog");

Expand Down
2 changes: 1 addition & 1 deletion src/Stars.Services/Terradue.Stars.Services.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<TargetFramework>netstandard2.0</TargetFramework>
<Title>Terradue.Stars</Title>
<Description>Stars is a set of services for working with Spatio Temporal Catalog such as STAC but not only</Description>
<Version>2.19.5</Version>
<Version>2.19.6</Version>
<!-- <VersionSuffix>beta.8</VersionSuffix> -->
<Version Condition=" '$(VersionSuffix)' != '' ">$(Version)-$(VersionSuffix)</Version>
<AssemblyName>Terradue.Stars.Services</AssemblyName>
Expand Down

0 comments on commit 9c48734

Please sign in to comment.