-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'origin/main' into fl/rust
- Loading branch information
Showing
285 changed files
with
33,071 additions
and
23,649 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
# Connecting to ArmoniK Securely using gRPC in Python | ||
|
||
## Overview | ||
|
||
This guide provides steps to connect to ArmoniK securely using gRPC in Python. ArmoniK supports both TLS and mTLS (mutual TLS) for secure communication. | ||
|
||
## Prerequisites | ||
|
||
Before proceeding, make sure that ArmoniK is deployed with the necessary certificates. Follow the steps below: | ||
|
||
1. Ensure that ArmoniK is deployed with authentication. Refer to the [How to configure authentication in ArmoniK](https://aneoconsulting.github.io/ArmoniK/guide/how-to/how-to-configure-authentication#how-to-configure-authentication) guide for detailed instructions. | ||
|
||
2. Deploy ArmoniK. | ||
|
||
3. Certificates will be generated: | ||
|
||
### TLS | ||
|
||
- `ca.crt`: Certificate Authority root certificate | ||
|
||
### mTLS | ||
|
||
- `ca.crt`: Certificate Authority root certificate | ||
- `client.submitter.crt`: Client certificate for submission | ||
- `client.submitter.key`: Private key corresponding to the client certificate | ||
|
||
## Create Credentials for a Secure Channel | ||
|
||
### Use the provided certificates to establish secure channel credentials | ||
|
||
When interacting with ArmoniK using Python, use the Common name as the endpoint. Ensure that the certificate's Common Name (CN) matches the endpoint name. | ||
|
||
### If the given certificate common name doesn't match the endpoint name (Armonik default certificates for example) | ||
|
||
Update your system's hosts file to associate the ArmoniK control plane address with the domain name "armonik.local". Use the following command to edit the hosts file: | ||
|
||
```bash | ||
sudo nano /etc/hosts | ||
``` | ||
|
||
Use `armonik.local` as endpoint and don't forget to specify the port | ||
|
||
```bash | ||
armonik.local:5001 | ||
``` | ||
|
||
## Launching the Python Script | ||
|
||
Once you have configured ArmoniK and updated your hosts file, you can execute the example script from the root. Ensure that you have the Armonik Python dependencie installed. | ||
|
||
```bash | ||
pip install armonik | ||
``` | ||
|
||
1. **For Insecure Channel** | ||
|
||
```bash | ||
python examples/python/secure_grpc_client.py | ||
``` | ||
|
||
2. **For TLS Secure Channel** | ||
|
||
```bash | ||
python examples/python/secure_grpc_client.py --endpoint armonik.local:5001 --ssl [--ca <ca.crt path>] | ||
``` | ||
|
||
3. **For Mutual TLS Secure Channel** | ||
|
||
```bash | ||
python examples/python/secure_grpc_client.py --endpoint armonik.local:5001 --ssl [--ca <ca.crt path>] --key <client.submitter.key path> --cert <client.submitter.crt> | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
import { createConfigForNuxt } from '@nuxt/eslint-config/flat' | ||
|
||
export default createConfigForNuxt({ | ||
features: { | ||
typescript: true | ||
} | ||
}).prepend({ | ||
rules: { | ||
'vue/max-attributes-per-line': 'off', | ||
'vue/no-multiple-template-root': 'off', | ||
'vue/no-restricted-syntax': 'error' | ||
}, | ||
ignores: [ | ||
'dist', | ||
'node_modules', | ||
'.output', | ||
'.nuxt' | ||
] | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,7 +2,6 @@ | |
"name": "armonik-api-docs", | ||
"version": "0.1.0", | ||
"private": true, | ||
"packageManager": "[email protected]", | ||
"scripts": { | ||
"prepare": "nuxi prepare", | ||
"dev": "nuxi dev", | ||
|
@@ -15,13 +14,13 @@ | |
"lint:md:fix": "markdownlint . --fix && case-police --fix ./**/*.md" | ||
}, | ||
"dependencies": { | ||
"@aneoconsultingfr/armonik-docs-theme": "^0.6.12", | ||
"nuxt": "^3.6.1" | ||
"@aneoconsultingfr/armonik-docs-theme": "^0.6.13", | ||
"nuxt": "^3.6.5" | ||
}, | ||
"devDependencies": { | ||
"@nuxtjs/eslint-config-typescript": "^12.0.0", | ||
"@nuxt/eslint-config": "^0.3.8", | ||
"case-police": "^0.6.1", | ||
"eslint": "^8.44.0", | ||
"markdownlint-cli": "^0.35.0" | ||
"eslint": "^9.0.0", | ||
"markdownlint-cli": "^0.34.0" | ||
} | ||
} |
Oops, something went wrong.