Skip to content

Commit e7c9f99

Browse files
authored
Merge pull request #6 from bcgov/service_account
update Service account details
2 parents 525867f + c8eb6f3 commit e7c9f99

File tree

3 files changed

+57
-2
lines changed

3 files changed

+57
-2
lines changed

docs/Config.md

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,32 @@ This mode is generally recommended for systems where you expect to use COMS at a
6868
},
6969
```
7070
71+
Basic Auth can also be used where machine-to-machine API access is required. This can be set by enabling the s3AccessMode in the configuration, which is enabled by default on all COMS environments. This setup is suitable for service-level account access.
72+
73+
```sh
74+
"basicAuth": {
75+
"enabled": “true", # note: to disable, delete this environment variable
76+
"s3AccessMode": "true",
77+
78+
"password": "<custom Basic Auth Password.",
79+
"username": "<custom Basic Auth Username>"
80+
},
81+
```
82+
83+
In this case, storage credentials provided by the optimization teams are used to grant access. The following are used as user and password:
84+
85+
```sh
86+
accesskeyid
87+
accesskeysecret
88+
```
89+
90+
Additional request params: bucket and endpoint must be provided in the request headers using the following key-value pairs:
91+
92+
```sh
93+
x-amz-bucket: <bucket>
94+
x-amz-endpoint: <endpoint>
95+
```
96+
7197
### Full
7298
7399
This mode is generally recommended for systems that need both user level and administrative level access to objects. This grants the full suite of functionality COMS offers, but care must be taken to ensure that access to objects is done securely from your line of business application.

docs/Service-Account.md

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
## Service Account API access**
2+
3+
Service account feature for COMS can be enabled by setting s3AccessMode enabled in configuration, it allows automated systems or services to securely interact with the COMS environment using access keys for authentication. Below are the steps for configuring and utilizing s3AccessMode.
4+
5+
### Credentials
6+
7+
For M2M API access, the storage credentials are used to authenticate API requests. These credentials consist of an Access Key ID and Access Key Secret, which are essential for machine-to-machine communication.
8+
9+
#### Service Account Credentials:
10+
**accesskeyid:*** The unique identifier for the service account.
11+
12+
**accesskeysecret:** The associated secret key for the service account.
13+
14+
#### Set Request Headers and Parameters
15+
16+
With s3AccessMode enabled, the M2M communication requires specific headers to authenticate and provide access correctly.
17+
18+
**Headers to Include**:
19+
20+
***x-amz-bucket:*** The name of the bucket being accessed by the service account.
21+
22+
***x-amz-endpoint:*** The endpoint to which the request is directed.
23+
24+
### Security Considerations
25+
26+
* **Store Credentials Securely**: Ensure the accesskeyid and accesskeysecret are stored securely, such as in environment variables or a secure credential vault, to prevent unauthorized access.
27+
28+
* **Use HTTPS**: Make sure that all API requests are made over HTTPS to protect sensitive data during transmission.

mkdocs.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,13 @@ markdown_extensions:
1313
nav:
1414
- Introduction: index.md
1515
- API User Guide:
16-
- Authentication: Authentication.md
16+
- Authentication: Authentication.md
1717
- Endpoint Notes: Endpoint-Notes.md
1818
- Permissions: Permissions.md
1919
- Metadata and Tags: Metadata-Tag.md
2020
- Managing buckets: Buckets.md
21-
- Synchronization: Synchronization.md
21+
- Service Account: Service-Account.md
22+
- Synchronization: Synchronization.md
2223
- Use-Case Examples: Use-Case-Examples.md
2324
- Deployment Guide:
2425
- Self-Hosting COMS: Self-Hosting-COMS.md

0 commit comments

Comments
 (0)