mirror of
https://github.com/dyzulk/trustlab-docs.git
synced 2026-01-26 05:25:38 +07:00
docs: add copy button to code blocks
This commit is contained in:
@@ -14,7 +14,7 @@ description: Documentation for TrustLab API Endpoints including scanning and iss
|
|||||||
### Request Certificate
|
### Request Certificate
|
||||||
`POST /certificates`
|
`POST /certificates`
|
||||||
|
|
||||||
```json
|
```json copy
|
||||||
{
|
{
|
||||||
"csr": "-----BEGIN CERTIFICATE REQUEST-----...",
|
"csr": "-----BEGIN CERTIFICATE REQUEST-----...",
|
||||||
"validity_days": 365
|
"validity_days": 365
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ You can use our REST API to automate certificate issuance, revocation, and retri
|
|||||||
|
|
||||||
## Base URL
|
## Base URL
|
||||||
|
|
||||||
```http
|
```http copy
|
||||||
https://trustlab.dyzulk.com/api/v1
|
https://trustlab.dyzulk.com/api/v1
|
||||||
```
|
```
|
||||||
|
|
||||||
@@ -19,6 +19,6 @@ https://trustlab.dyzulk.com/api/v1
|
|||||||
|
|
||||||
All API requests must include your API Key in the `Authorization` header.
|
All API requests must include your API Key in the `Authorization` header.
|
||||||
|
|
||||||
```bash
|
```bash copy
|
||||||
Authorization: Bearer <YOUR_API_KEY>
|
Authorization: Bearer <YOUR_API_KEY>
|
||||||
```
|
```
|
||||||
|
|||||||
@@ -21,22 +21,22 @@ Select your distribution to get the optimized installation command:
|
|||||||
|
|
||||||
<Tabs items={['Debian/Ubuntu', 'RHEL/CentOS', 'Arch Linux', 'Universal']}>
|
<Tabs items={['Debian/Ubuntu', 'RHEL/CentOS', 'Arch Linux', 'Universal']}>
|
||||||
<Tabs.Tab>
|
<Tabs.Tab>
|
||||||
```bash
|
```bash copy
|
||||||
sudo apt update && sudo apt install -y curl && curl -sL https://cdn.trustlab.dyzulk.com/ca/bundles/trustlab-all.sh | sudo bash
|
sudo apt update && sudo apt install -y curl && curl -sL https://cdn.trustlab.dyzulk.com/ca/bundles/trustlab-all.sh | sudo bash
|
||||||
```
|
```
|
||||||
</Tabs.Tab>
|
</Tabs.Tab>
|
||||||
<Tabs.Tab>
|
<Tabs.Tab>
|
||||||
```bash
|
```bash copy
|
||||||
(sudo yum install -y curl || sudo dnf install -y curl) && curl -sL https://cdn.trustlab.dyzulk.com/ca/bundles/trustlab-all.sh | sudo bash
|
(sudo yum install -y curl || sudo dnf install -y curl) && curl -sL https://cdn.trustlab.dyzulk.com/ca/bundles/trustlab-all.sh | sudo bash
|
||||||
```
|
```
|
||||||
</Tabs.Tab>
|
</Tabs.Tab>
|
||||||
<Tabs.Tab>
|
<Tabs.Tab>
|
||||||
```bash
|
```bash copy
|
||||||
sudo pacman -Sy --noconfirm curl && curl -sL https://cdn.trustlab.dyzulk.com/ca/bundles/trustlab-all.sh | sudo bash
|
sudo pacman -Sy --noconfirm curl && curl -sL https://cdn.trustlab.dyzulk.com/ca/bundles/trustlab-all.sh | sudo bash
|
||||||
```
|
```
|
||||||
</Tabs.Tab>
|
</Tabs.Tab>
|
||||||
<Tabs.Tab>
|
<Tabs.Tab>
|
||||||
```bash
|
```bash copy
|
||||||
curl -sL https://cdn.trustlab.dyzulk.com/ca/bundles/trustlab-all.sh | sudo bash
|
curl -sL https://cdn.trustlab.dyzulk.com/ca/bundles/trustlab-all.sh | sudo bash
|
||||||
```
|
```
|
||||||
</Tabs.Tab>
|
</Tabs.Tab>
|
||||||
|
|||||||
@@ -24,7 +24,7 @@ Select your web server environment below:
|
|||||||
### Nginx Setup
|
### Nginx Setup
|
||||||
Target File: `/etc/nginx/sites-available/default` or `internal.app.conf`
|
Target File: `/etc/nginx/sites-available/default` or `internal.app.conf`
|
||||||
|
|
||||||
```nginx
|
```nginx copy
|
||||||
server {
|
server {
|
||||||
listen 80;
|
listen 80;
|
||||||
server_name internal.app;
|
server_name internal.app;
|
||||||
@@ -50,7 +50,7 @@ Select your web server environment below:
|
|||||||
### Apache / HTTPD Setup
|
### Apache / HTTPD Setup
|
||||||
Target File: `/etc/httpd/conf.d/ssl.conf` or VHost file.
|
Target File: `/etc/httpd/conf.d/ssl.conf` or VHost file.
|
||||||
|
|
||||||
```apache
|
```apache copy
|
||||||
<VirtualHost *:443>
|
<VirtualHost *:443>
|
||||||
ServerName internal.app
|
ServerName internal.app
|
||||||
DocumentRoot /var/www/html/internal
|
DocumentRoot /var/www/html/internal
|
||||||
|
|||||||
@@ -30,13 +30,13 @@ Standard command-line tools often look for a specific bundle file.
|
|||||||
|
|
||||||
**Solution:**
|
**Solution:**
|
||||||
Pass the Root CA explicitly:
|
Pass the Root CA explicitly:
|
||||||
```bash
|
```bash copy
|
||||||
curl --cacert /path/to/trustlab-root.crt https://your-domain.local
|
curl --cacert /path/to/trustlab-root.crt https://your-domain.local
|
||||||
```
|
```
|
||||||
|
|
||||||
### Wget
|
### Wget
|
||||||
**Solution:**
|
**Solution:**
|
||||||
```bash
|
```bash copy
|
||||||
wget --ca-certificate=/path/to/trustlab-root.crt https://your-domain.local
|
wget --ca-certificate=/path/to/trustlab-root.crt https://your-domain.local
|
||||||
```
|
```
|
||||||
|
|
||||||
@@ -53,7 +53,7 @@ Node.js does not use the System Root CA by default.
|
|||||||
**Solution (Environment Variable):**
|
**Solution (Environment Variable):**
|
||||||
Set this variable before running your application. It works for most Node.js apps (npm, yarn, custom scripts).
|
Set this variable before running your application. It works for most Node.js apps (npm, yarn, custom scripts).
|
||||||
|
|
||||||
```bash
|
```bash copy
|
||||||
export NODE_EXTRA_CA_CERTS="/path/to/trustlab-root.crt"
|
export NODE_EXTRA_CA_CERTS="/path/to/trustlab-root.crt"
|
||||||
node server.js
|
node server.js
|
||||||
```
|
```
|
||||||
@@ -71,7 +71,7 @@ Python's `requests` library (and `pip`) uses its own certificate bundle (`certif
|
|||||||
**Solution:**
|
**Solution:**
|
||||||
Point to your Root CA using an environment variable.
|
Point to your Root CA using an environment variable.
|
||||||
|
|
||||||
```bash
|
```bash copy
|
||||||
export REQUESTS_CA_BUNDLE="/path/to/trustlab-root.crt"
|
export REQUESTS_CA_BUNDLE="/path/to/trustlab-root.crt"
|
||||||
python script.py
|
python script.py
|
||||||
```
|
```
|
||||||
@@ -94,7 +94,7 @@ You must import the TrustLab Root CA into the Java Keystore (cacerts).
|
|||||||
Usually at `$JAVA_HOME/lib/security/cacerts`.
|
Usually at `$JAVA_HOME/lib/security/cacerts`.
|
||||||
|
|
||||||
### Import with keytool
|
### Import with keytool
|
||||||
```bash
|
```bash copy
|
||||||
keytool -import -trustcacerts -alias trustlab-root \
|
keytool -import -trustcacerts -alias trustlab-root \
|
||||||
-file trustlab-root.crt \
|
-file trustlab-root.crt \
|
||||||
-keystore "$JAVA_HOME/lib/security/cacerts"
|
-keystore "$JAVA_HOME/lib/security/cacerts"
|
||||||
|
|||||||
Reference in New Issue
Block a user