Home Storage

Storage

By D
• 4 articles

Get S3 access keys for your Object Storage containers

Your Object Storage containers work with any tool that speaks S3: the AWS CLI, Python boto3, rclone, Cyberduck, Terraform, backup software and most media and website tools. To connect one, you need three things: - an endpoint (the address of the region your container is in) - an Access Key - a Secret Key You create the keys yourself, so only you ever see them. It takes about five minutes the first time. Before you start - A container in Object Storage > Containers. Each container shows up in S3 tools as a bucket with the same name. - Python 3 on your computer (Mac, Linux or Windows). Step 1: Create an Application Credential An Application Credential lets the command line act on your behalf without your Gewape ID password. 1. In the console, click your name at the top right and choose Application Credentials. 2. Click Create. 3. Name: something you will recognize later, for example s3-access. 4. Expires At: leave empty for no expiry, or pick a date if the key is temporary. 5. Roles: keep the default. 6. Unrestricted: leave unticked. 7. Click OK. Copy the ID and the Secret now. The Secret is shown only once. If you lose it, delete the credential and create a new one. More detail: API access and Application Credentials. Step 2: Install the tools (once) pip install python-openstackclient awscli Step 3: Sign in from your terminal On Mac or Linux: export OS_AUTH_TYPE=v3applicationcredential export OS_AUTH_URL=https://api.kgl.gewapecloud.com:5000/v3 export OS_APPLICATION_CREDENTIAL_ID=your-id export OS_APPLICATION_CREDENTIAL_SECRET=your-secret On Windows PowerShell: $env:OS_AUTH_TYPE="v3applicationcredential" $env:OS_AUTH_URL="https://api.kgl.gewapecloud.com:5000/v3" $env:OS_APPLICATION_CREDENTIAL_ID="your-id" $env:OS_APPLICATION_CREDENTIAL_SECRET="your-secret" Step 4: Create your S3 keys openstack ec2 credentials create In the result, access is your S3 Access Key and secret is your S3 Secret Key. The keys work for every container in your project. To see your keys later: openstack ec2 credentials list Step 5: Connect your S3 tool Use the endpoint of the region your container is in: | Region | Endpoint | |---|---| | Kigali | https://s3.kgl.gewapecloud.com | | Huye | https://s3.huy.gewapecloud.com | | Nairobi | https://s3.nbo.gewapecloud.com | Each container answers only on the endpoint of its own region. A Kigali container used through another region's endpoint is refused, so always match the endpoint to the region you chose when you created the container. AWS CLI aws configure Enter your Access Key and Secret Key. For Default region name enter us-east-1. Leave the output format empty. Then test (Kigali shown, use your region's endpoint): aws --endpoint-url https://s3.kgl.gewapecloud.com s3 ls You should see your containers listed. Everyday commands: aws --endpoint-url https://s3.kgl.gewapecloud.com s3 cp report.pdf s3://my-container/ aws --endpoint-url https://s3.kgl.gewapecloud.com s3 cp s3://my-container/report.pdf . aws --endpoint-url https://s3.kgl.gewapecloud.com s3 sync ./backup s3://my-container/backup Python (boto3) import boto3 s3 = boto3.client( "s3", endpoint_url="https://s3.kgl.gewapecloud.com", aws_access_key_id="YOUR_ACCESS_KEY", aws_secret_access_key="YOUR_SECRET_KEY", region_name="us-east-1", ) print(s3.list_buckets()["Buckets"]) Any other tool (rclone, Cyberduck, backup software): choose "S3 compatible" or "Other S3" and use: - Endpoint: your region's endpoint from the table - HTTPS: on - Addressing: path style (not virtual-host style) - Region: us-east-1 Keep your keys safe - Never share your keys or paste them in a chat or email, including with us. Gewape Cloud will never ask for them. - Running production and test, or several services? Give each its own keys and only the access it needs: Keep production and test apart, with least-privilege keys. - Create separate keys for each app or server. You can then revoke one without touching the others. - If a key may have leaked, delete it straight away and create a new one: openstack ec2 credentials delete ACCESS_KEY If something does not work - InvalidAccessKeyId or SignatureDoesNotMatch: check you copied both keys in full, with no spaces. - NoSuchBucket: the container name is case sensitive, and the endpoint must be the region the container is in. - Could not connect to the endpoint URL: check the endpoint starts with https:// and that you set path-style addressing. - The request you have made requires authentication at step 4: the Application Credential ID or Secret is wrong or expired. Create a new one. Still stuck? Use the chat on this page and send us the exact error message (never your keys).

Last updated on Nov 11, 2026

Keep production and test apart, with least-privilege keys

One S3 key that can do everything is the most common Object Storage risk. If it leaks from a test laptop or a log file, it can delete your production data. This guide shows the setup regulated teams use: - Production and test are fully separate. Each has its own projects, containers and keys. - The project that owns the data is not the project your services use. A service key can read and write files. It cannot delete containers, remove old versions, change who has access, or turn off encryption. - Each service gets only what it needs. For example, an upload service gets read and write, and a reporting service gets read only. This setup is available for containers in Kigali (https://s3.kgl.gewapecloud.com). How it works On Gewape Cloud an S3 key acts as the project it was created in. So you give each kind of access its own small project, and the container owner decides, with a container policy, what each of those projects may do. | Project | What it holds | Who uses it | |---|---|---| | yourorg-prod-data | Production containers | One or two named owners. No application runs here. | | yourorg-prod-upload | Only the S3 key for that service | The upload service | | yourorg-prod-reports | Only the S3 key for that service | The reporting service | | yourorg-test-data and yourorg-test-... | The same layout for test | Your team and test services | Create one service project per kind of access, not per server. Ten servers that do the same job share one service project, each with its own key. Step 1: Create your projects Signed in as an owner of your main project, click the account icon at the top right, choose Projects, then Create project. Create one for production data, one per service, and the same for test. Step by step: Create and switch projects. All of them belong to your account and are billed to your one wallet. To work in one, open Projects again and click Switch. Step 2: Create a key in each project For each service project, first add a service login: in Projects, click Access next to it, enter a shared team mailbox (for example upload-prod@yourcompany.com), choose Engineer and click Add. Sign in as that login for the next steps, and create its Application Credential with no expiry date. The service's key then never depends on one person. Follow Get S3 access keys for your Object Storage containers once per project. Before you create the Application Credential, switch to the right project (account icon, Projects, Switch): the keys always belong to the project you are in. Then note each service project's ID. You need it in step 4: openstack project show yourorg-prod-upload -f value -c id Keep the data project's key for administration only. Never put it in an application. Step 3: Create the container and protect it With the data project's key: S3="aws --endpoint-url https://s3.kgl.gewapecloud.com" $S3 s3api create-bucket --bucket yourorg-prod-files $S3 s3api put-bucket-versioning --bucket yourorg-prod-files --versioning-configuration Status=Enabled Versioning keeps earlier copies of every file, so an overwrite or a delete can always be undone by the owners. Container names are shared across the whole platform, so start them with your organization name. Step 4: Give each service exactly what it needs Save this as policy.json, with your container name and the two project IDs from step 2: { "Version": "2012-10-17", "Statement": [ { "Sid": "upload-read-write", "Effect": "Allow", "Principal": {"AWS": ["arn:aws:iam::UPLOAD_PROJECT_ID:root"]}, "Action": ["s3:PutObject", "s3:GetObject"], "Resource": ["arn:aws:s3:::yourorg-prod-files/*"] }, { "Sid": "reports-read", "Effect": "Allow", "Principal": {"AWS": ["arn:aws:iam::REPORTS_PROJECT_ID:root"]}, "Action": ["s3:GetObject"], "Resource": ["arn:aws:s3:::yourorg-prod-files/*"] }, { "Sid": "both-list", "Effect": "Allow", "Principal": {"AWS": ["arn:aws:iam::UPLOAD_PROJECT_ID:root", "arn:aws:iam::REPORTS_PROJECT_ID:root"]}, "Action": ["s3:ListBucket"], "Resource": ["arn:aws:s3:::yourorg-prod-files"] } ] } Apply it with the data project's key: $S3 s3api put-bucket-policy --bucket yourorg-prod-files --policy file://policy.json Write the principal exactly as arn:aws:iam::PROJECT_ID:root, which means "S3 keys from that project". Other formats you may know from AWS do not match, and the service is refused. Anything you do not list is refused: deleting files, deleting versions, deleting the container, changing the policy, versioning or encryption. If a service really must delete files, add "s3:DeleteObject" to its statement only. Earlier versions are still kept, and only the owners can remove them. Step 5: Prove it before you go live With the upload service's key, every one of these must answer AccessDenied: $S3 s3api delete-bucket --bucket yourorg-prod-files $S3 s3api put-bucket-versioning --bucket yourorg-prod-files --versioning-configuration Status=Suspended $S3 s3api put-bucket-policy --bucket yourorg-prod-files --policy file://policy.json $S3 s3api delete-object --bucket yourorg-prod-files --key some-file.txt With the reports service's key, an upload must be refused too: $S3 s3 cp test.txt s3://yourorg-prod-files/ Keep the output for your security records. Then repeat steps 2 to 5 for test, with separate keys and containers. Never copy a production key into test. Upload and download links, and websites Pre-signed links let a browser or a mobile app upload or download one file without ever seeing a key. Sign them on your server with the service key that has the access. In Python (boto3): url = s3.generate_presigned_url("put_object", Params={"Bucket": "yourorg-prod-files", "Key": "uploads/1.wav"}, ExpiresIn=900) Uploads straight from your website (CORS): allow your site's address on the container, with the data project's key: $S3 s3api put-bucket-cors --bucket yourorg-prod-files --cors-configuration '{"CORSRules":[{"AllowedOrigins":["https://app.yourdomain.com"],"AllowedMethods":["GET","PUT"],"AllowedHeaders":["*"],"MaxAgeSeconds":3000}]}' List only your real website addresses. Never use * on a container that holds personal data. Encryption with your own key In Kigali you can also encrypt every file with a key that lives in your data project, so you can switch off access to the data yourself at any time. It works with this setup unchanged: Encrypt Object Storage with your own key. Good practice - Two owners per data project, so access never depends on one person. - Change a service key by creating the new key, switching the service over, then deleting the old one with openstack ec2 credentials delete ACCESS_KEY. - Keys belong to the login that created them, and a key created with an Application Credential stops working when that credential expires or is deleted. That is why each service uses a service login (step 2) with an Application Credential that has no expiry date. - Review who can use each project in Projects > Access when people join or leave. - Never put keys in code, images, tickets or chat. Gewape Cloud will never ask for them. If something does not work - AccessDenied for a service that should have access: check the principal is arn:aws:iam::PROJECT_ID:root with the service project's ID, and that the key was created in that project. - AccessDenied for everything with the data key: you are using a service key, or the endpoint is not https://s3.kgl.gewapecloud.com. - MalformedPolicy: check the JSON, especially commas and the container name in Resource. Want us to check your setup? Use the chat on this page. We review policies and run the go-live check with you, and we never need your secret keys to do it.

Last updated on Nov 12, 2026

Encrypt Object Storage with your own key

Every disk behind Gewape Cloud Object Storage is already encrypted. This adds a second layer that only you control: each file is encrypted with a key that lives in your own project. Remove our storage service's access to that key and the files cannot be read through the service at all until you give it back. This is called server-side encryption with a customer-managed key (SSE-KMS). It is available for containers in Kigali (https://s3.kgl.gewapecloud.com). What you need - A container in Kigali and S3 keys for its project: Get S3 access keys for your Object Storage containers. - The command line signed in to the same project (step 3 of that article). - The key manager tool, once: pip install python-barbicanclient Step 1: Create your key openstack secret order create --name my-storage-key --algorithm aes --bit-length 256 --mode ctr key Copy the Order href from the result, then check the order: openstack secret order get ORDER_HREF When Status is ACTIVE, copy the Secret href. The last part of it, after /secrets/, is your key ID. Step 2: Let the storage service use the key openstack acl user add --user 4210a22c96d14384b45a8c25d02fef2d --operation-type read SECRET_HREF This gives our storage service read access to that one key, and nothing else in your project. It is also your off switch: remove it and every file encrypted with the key becomes unreadable at once. Step 3: Encrypt everything in the container by default aws --endpoint-url https://s3.kgl.gewapecloud.com s3api put-bucket-encryption --bucket my-container --server-side-encryption-configuration '{"Rules":[{"ApplyServerSideEncryptionByDefault":{"SSEAlgorithm":"aws:kms","KMSMasterKeyID":"KEY_ID"}}]}' From now on every upload is encrypted with your key, including uploads that send no encryption settings and uploads through pre-signed links. Your apps need no change. Files already in the container stay as they were: upload them again to encrypt them. Check it worked Upload a file, then: aws --endpoint-url https://s3.kgl.gewapecloud.com s3api head-object --bucket my-container --key my-file.txt The result shows "ServerSideEncryption": "aws:kms" and your key ID. Good to know - Checksums are unchanged. For a normal upload the ETag is still the MD5 of the file, and Content-MD5 checks work as usual. For multipart uploads, each part's ETag is the MD5 of that part, and the final ETag uses the usual MD5-of-parts format with a -N suffix. - Separate services work as normal. If you use separate projects for your services (Keep production and test apart, with least-privilege keys), create the key in the data project. Services read and write through the container policy and never need access to the key. - Switch off access: openstack acl user remove --user 4210a22c96d14384b45a8c25d02fef2d SECRET_HREF. Switch it back on with the acl user add command from step 2. - Never delete the key while files encrypted with it still exist. Without the key those files are gone for good, and we cannot recover them. If something does not work - InvalidRequest when uploading or setting default encryption: the container is not in Kigali, or you used another region's endpoint. Use https://s3.kgl.gewapecloud.com. - AccessDenied or a 500 error on upload or download: the storage service cannot read the key. Run step 2 again with the exact Secret href. - The secret order stays PENDING: wait a minute and run openstack secret order get again. Need a hand? Use the chat on this page. We can walk through it with you, and we never need your secret keys or your encryption key to do it.

Last updated on Nov 12, 2026