ceph:authentication_with_dotnet
Differences
This shows you the differences between two versions of the page.
ceph:authentication_with_dotnet [2019/06/20 10:08] – ↷ Page moved from documentation:linux:ceph:authentication_with_dotnet to ceph:authentication_with_dotnet dodger | ceph:authentication_with_dotnet [Unknown date] (current) – removed - external edit (Unknown date) 127.0.0.1 | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== Authentication with .Net/c# ====== | ||
- | ^ Documentation | ||
- | ^Name:| Authentication with .Net/c# | | ||
- | ^Description: | ||
- | ^Modification date : | ||
- | ^Owner: | ||
- | ^Notify changes to:|Owner| | ||
- | ^Tags:| oracle, deadlocks| | ||
- | ^Scalate to:|DBA| | ||
- | |||
- | ====== Instructions ====== | ||
- | |||
- | RadosGW seems to not be happy when using AWS4 authentication method.\\ | ||
- | Ignore ceph's official documentation, | ||
- | Making '' | ||
- | <code bash> | ||
- | radosgw -n client.rgw.bvmld-osgw-101 --debug-rgw=20 -f --debug_ms 20 | ||
- | </ | ||
- | You'll see a wonderful: | ||
- | < | ||
- | ... | ||
- | 2018-11-07 12: | ||
- | ... | ||
- | 2018-11-07 12: | ||
- | 2018-11-07 12: | ||
- | 2018-11-07 12: | ||
- | 2018-11-07 12: | ||
- | 2018-11-07 12: | ||
- | 2018-11-07 12: | ||
- | 2018-11-07 12: | ||
- | 2018-11-07 12: | ||
- | 2018-11-07 12: | ||
- | 2018-11-07 12: | ||
- | 2018-11-07 12: | ||
- | 2018-11-07 12: | ||
- | 2018-11-07 12: | ||
- | 2018-11-07 12: | ||
- | </ | ||
- | As you can see: '' | ||
- | |||
- | The key option is to use an " | ||
- | <code c> | ||
- | config.SignatureVersion = " | ||
- | </ | ||
- | |||
- | [[https:// | ||
- | |||
- | |||
- | |||
- | |||
- | ====== Sample code ====== | ||
- | |||
- | |||
- | <file c sample_ceph.cpp> | ||
- | using System; | ||
- | using System.Collections.Generic; | ||
- | using System.Linq; | ||
- | using System.Text; | ||
- | using System.Threading.Tasks; | ||
- | using Amazon; | ||
- | using Amazon.S3; | ||
- | using Amazon.S3.Model; | ||
- | |||
- | namespace ProvaS3 | ||
- | { | ||
- | class Program | ||
- | { | ||
- | static void Main(string[] args) | ||
- | { | ||
- | |||
- | string accessKey = " | ||
- | string secretKey = " | ||
- | |||
- | AmazonS3Config config = new AmazonS3Config(); | ||
- | config.ServiceURL = " | ||
- | config.UseHttp = true; | ||
- | config.SignatureVersion = " | ||
- | | ||
- | // | ||
- | | ||
- | AmazonS3Client s3Client = new AmazonS3Client( | ||
- | accessKey, | ||
- | secretKey, | ||
- | config | ||
- | ); | ||
- | | ||
- | ListObjectsRequest request = new ListObjectsRequest(); | ||
- | request.BucketName = " | ||
- | ListObjectsResponse response = s3Client.ListObjects(request); | ||
- | foreach (S3Object o in response.S3Objects) | ||
- | { | ||
- | Console.WriteLine(" | ||
- | } | ||
- | } | ||
- | } | ||
- | } | ||
- | </ |
ceph/authentication_with_dotnet.1561025325.txt.gz · Last modified: 2019/06/20 10:08 by dodger