Skip to content

Commit

Permalink
docs(secure-storage-connector): Adding manual instructions. (#191)
Browse files Browse the repository at this point in the history
* docs(secure-storage-connector): Adding manual instructions.
  • Loading branch information
zacharyblasczyk authored Mar 8, 2024
1 parent 74a2854 commit 7c68cd1
Showing 1 changed file with 69 additions and 0 deletions.
69 changes: 69 additions & 0 deletions modules/secure_storage_connector/manual.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
# Secure Storage Connector Manual

If you have your own bucket that you would like to integrate with W&B, create the following policy file `bucket-policy.json`.

```json title="bucket-policy.json"
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Principal": { "AWS": "arn:aws:iam::${BUCKET_ACCOUNT_ID}:role/${BUCKET_MANAGMENT}" },
"Action": ["s3:*"],
"Resource": ["arn:aws:s3:::${BUCKET_NAME}", "arn:aws:s3:::${BUCKET_NAME}/*"]
},
{
"Sid": "WandbAccountAccess",
"Effect": "Allow",
"Principal": { "AWS": "arn:aws:iam::725579432336:role/WandbIntegration" },
"Action": [
"s3:GetObject*",
"s3:GetEncryptionConfiguration",
"s3:ListBucket",
"s3:ListBucketMultipartUploads",
"s3:ListBucketVersions",
"s3:AbortMultipartUpload",
"s3:DeleteObject",
"s3:PutObject",
"s3:GetBucketCORS",
"s3:GetBucketLocation",
"s3:GetBucketVersioning"
],
"Resource": ["arn:aws:s3:::${BUCKET_NAME}", "arn:aws:s3:::${BUCKET_NAME}/*"]
}
]
}
```
Then run the following:

`aws s3api put-bucket-policy --bucket ${BUCKET_NAME} --policy file://bucket-policy.json`

Verify the policy with:

`aws s3api get-bucket-policy --bucket ${BUCKET_NAME}`

You will also need to add the following cors policy.

Create the following `cors-policy.json`:

``` json title="cors-policy.json"
{
"CORSRules": [
{
"AllowedOrigins": ["*"],
"AllowedHeaders": ["*"],
"AllowedMethods": ["GET", "HEAD", "PUT"],
"MaxAgeSeconds": 3000,
"ExposeHeaders": ["ETag"]
}
]
}
```

Then run:

`aws s3api put-bucket-cors --bucket ${BUCKET_NAME} --cors-configuration file://cors-policy.json`

To verify:

`aws s3api get-bucket-cors --bucket ${BUCKET_NAME}`

0 comments on commit 7c68cd1

Please sign in to comment.