Skip to content

Commit

Permalink
Document RPC authentication JWT algorithm option
Browse files Browse the repository at this point in the history
Signed-off-by: Jorge F Pastor <jorgefpastor@gmail.com>
  • Loading branch information
JorgeFPastor committed Feb 12, 2024
1 parent 4994186 commit f1d5fe7
Show file tree
Hide file tree
Showing 12 changed files with 490 additions and 10 deletions.
4 changes: 2 additions & 2 deletions docs/public-networks/how-to/use-besu-api/authenticate.md
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ The [key algorithm](https://datatracker.ietf.org/doc/html/rfc7518#section-3.1) c
- RSA with private key length of at least 2048 bits using algorithm `RS256`, `RS384` or `RS512`.
- ECDSA private key, using `ES256` (`secp256r1` or `secp256k1`), `ES384` or `ES512`.

Besu default is `RS256`.
Besu default is `RS256`. When you use a different key algorithm you must specify the [`--rcp-http-authentication-jwt-algorithm`](../../reference/cli/options#rpc-http-authentication-jwt-algorithm) and/or [`--rcp-ws-authentication-jwt-algorithm`](../../reference/cli/options#rpc-ws-authentication-jwt-algorithm) option depending on your needs.

<Tabs>
<TabItem value="RS256 RSA Keys" label="RS256 RSA Keys" default>
Expand All @@ -179,7 +179,7 @@ Besu default is `RS256`.
```bash
openssl rsa -pubout -in privateRSAKey.pem -pubout -out publicRSAKey.pem
```

</TabItem>

<TabItem value="ES256 secp256r1 ECDSA Keys" label="`ES256 secp256r1 ECDSA Keys">
Expand Down
80 changes: 80 additions & 0 deletions docs/public-networks/reference/cli/options.md
Original file line number Diff line number Diff line change
Expand Up @@ -3240,6 +3240,46 @@ rpc-http-authentication-enabled=true

Enables or disables [authentication](../../how-to/use-besu-api/authenticate.md) for the HTTP JSON-RPC service.

### `rpc-http-authentication-jwt-algorithm`

<Tabs>

<TabItem value="Syntax" label="Syntax" default>

```bash
---rpc-http-authentication-jwt-algorithm=<jwt algorithm>
```

</TabItem>

<TabItem value="Example" label="Example">

```bash
--rpc-http-authentication-jwt-algorithm=ES256
```

</TabItem>

<TabItem value="Environment variable" label="Environment variable">

```bash
BESU_RPC_HTTP_AUTHENTICATION_JWT_ALGORITHM=ES256
```

</TabItem>

<TabItem value="Configuration file" label="Configuration file">

```bash
rpc-http-authentication-jwt-algorithm="ES256"
```

</TabItem>

</Tabs>

The [key algorithm](../../how-to/use-besu-api/authenticate#1-generate-a-private-and-public-key-pair) used to generate the keypair for [JWT public key authentication](../../how-to/use-besu-api/authenticate#jwt-public-key-authentication). The available API options are: `RS256`, `RS384`, `RS512`, `ES256`, `ES384` and `ES512`.

### `rpc-http-authentication-jwt-public-key-file`

<Tabs>
Expand Down Expand Up @@ -4182,6 +4222,46 @@ Enables or disables [authentication](../../how-to/use-besu-api/authenticate.md)

:::

### `rpc-ws-authentication-jwt-algorithm`

<Tabs>

<TabItem value="Syntax" label="Syntax" default>

```bash
---rpc-ws-authentication-jwt-algorithm=<jwt algorithm>
```

</TabItem>

<TabItem value="Example" label="Example">

```bash
--rpc-ws-authentication-jwt-algorithm=ES256
```

</TabItem>

<TabItem value="Environment variable" label="Environment variable">

```bash
BESU_RPC_WS_AUTHENTICATION_JWT_ALGORITHM=ES256
```

</TabItem>

<TabItem value="Configuration file" label="Configuration file">

```bash
rpc-ws-authentication-jwt-algorithm="ES256"
```

</TabItem>

</Tabs>

The [key algorithm](../../how-to/use-besu-api/authenticate#1-generate-a-private-and-public-key-pair) used to generate the keypair for [JWT public key authentication](../../how-to/use-besu-api/authenticate#jwt-public-key-authentication).

### `rpc-ws-authentication-jwt-public-key-file`

<Tabs>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ The [key algorithm](https://datatracker.ietf.org/doc/html/rfc7518#section-3.1) c
- RSA with private key length of at least 2048 bits using algorithm `RS256`, `RS384` or `RS512`.
- ECDSA private key, using `ES256` (`secp256r1` or `secp256k1`), `ES384` or `ES512`.

Besu default is `RS256`.
Besu default is `RS256`. When you use a different key algorithm you must specify the [`--rcp-http-authentication-jwt-algorithm`](../../reference/cli/options#rpc-http-authentication-jwt-algorithm) and/or [`--rcp-ws-authentication-jwt-algorithm`](../../reference/cli/options#rpc-ws-authentication-jwt-algorithm) option depending on your needs.

<Tabs>
<TabItem value="RS256 RSA Keys" label="RS256 RSA Keys" default>
Expand All @@ -179,7 +179,7 @@ Besu default is `RS256`.
```bash
openssl rsa -pubout -in privateRSAKey.pem -pubout -out publicRSAKey.pem
```

</TabItem>

<TabItem value="ES256 secp256r1 ECDSA Keys" label="`ES256 secp256r1 ECDSA Keys">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3203,6 +3203,46 @@ rpc-http-authentication-enabled=true

Enables or disables [authentication](../../how-to/use-besu-api/authenticate.md) for the HTTP JSON-RPC service.

### `rpc-http-authentication-jwt-algorithm`

<Tabs>

<TabItem value="Syntax" label="Syntax" default>

```bash
---rpc-http-authentication-jwt-algorithm=<jwt algorithm>
```

</TabItem>

<TabItem value="Example" label="Example">

```bash
--rpc-http-authentication-jwt-algorithm=ES256
```

</TabItem>

<TabItem value="Environment variable" label="Environment variable">

```bash
BESU_RPC_HTTP_AUTHENTICATION_JWT_ALGORITHM=ES256
```

</TabItem>

<TabItem value="Configuration file" label="Configuration file">

```bash
rpc-http-authentication-jwt-algorithm="ES256"
```

</TabItem>

</Tabs>

The [key algorithm](../../how-to/use-besu-api/authenticate#1-generate-a-private-and-public-key-pair) used to generate the keypair for [JWT public key authentication](../../how-to/use-besu-api/authenticate#jwt-public-key-authentication). The available API options are: `RS256`, `RS384`, `RS512`, `ES256`, `ES384` and `ES512`.

### `rpc-http-authentication-jwt-public-key-file`

<Tabs>
Expand Down Expand Up @@ -4145,6 +4185,46 @@ Enables or disables [authentication](../../how-to/use-besu-api/authenticate.md)

:::

### `rpc-ws-authentication-jwt-algorithm`

<Tabs>

<TabItem value="Syntax" label="Syntax" default>

```bash
---rpc-ws-authentication-jwt-algorithm=<jwt algorithm>
```

</TabItem>

<TabItem value="Example" label="Example">

```bash
--rpc-ws-authentication-jwt-algorithm=ES256
```

</TabItem>

<TabItem value="Environment variable" label="Environment variable">

```bash
BESU_RPC_WS_AUTHENTICATION_JWT_ALGORITHM=ES256
```

</TabItem>

<TabItem value="Configuration file" label="Configuration file">

```bash
rpc-ws-authentication-jwt-algorithm="ES256"
```

</TabItem>

</Tabs>

The [key algorithm](../../how-to/use-besu-api/authenticate#1-generate-a-private-and-public-key-pair) used to generate the keypair for [JWT public key authentication](../../how-to/use-besu-api/authenticate#jwt-public-key-authentication).

### `rpc-ws-authentication-jwt-public-key-file`

<Tabs>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ The [key algorithm](https://datatracker.ietf.org/doc/html/rfc7518#section-3.1) c
- RSA with private key length of at least 2048 bits using algorithm `RS256`, `RS384` or `RS512`.
- ECDSA private key, using `ES256` (`secp256r1` or `secp256k1`), `ES384` or `ES512`.

Besu default is `RS256`.
Besu default is `RS256`. When you use a different key algorithm you must specify the [`--rcp-http-authentication-jwt-algorithm`](../../reference/cli/options#rpc-http-authentication-jwt-algorithm) and/or [`--rcp-ws-authentication-jwt-algorithm`](../../reference/cli/options#rpc-ws-authentication-jwt-algorithm) option depending on your needs.

<Tabs>
<TabItem value="RS256 RSA Keys" label="RS256 RSA Keys" default>
Expand All @@ -179,7 +179,7 @@ Besu default is `RS256`.
```bash
openssl rsa -pubout -in privateRSAKey.pem -pubout -out publicRSAKey.pem
```

</TabItem>

<TabItem value="ES256 secp256r1 ECDSA Keys" label="`ES256 secp256r1 ECDSA Keys">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3246,6 +3246,46 @@ rpc-http-authentication-enabled=true

Enables or disables [authentication](../../how-to/use-besu-api/authenticate.md) for the HTTP JSON-RPC service.

### `rpc-http-authentication-jwt-algorithm`

<Tabs>

<TabItem value="Syntax" label="Syntax" default>

```bash
---rpc-http-authentication-jwt-algorithm=<jwt algorithm>
```

</TabItem>

<TabItem value="Example" label="Example">

```bash
--rpc-http-authentication-jwt-algorithm=ES256
```

</TabItem>

<TabItem value="Environment variable" label="Environment variable">

```bash
BESU_RPC_HTTP_AUTHENTICATION_JWT_ALGORITHM=ES256
```

</TabItem>

<TabItem value="Configuration file" label="Configuration file">

```bash
rpc-http-authentication-jwt-algorithm="ES256"
```

</TabItem>

</Tabs>

The [key algorithm](../../how-to/use-besu-api/authenticate#1-generate-a-private-and-public-key-pair) used to generate the keypair for [JWT public key authentication](../../how-to/use-besu-api/authenticate#jwt-public-key-authentication). The available API options are: `RS256`, `RS384`, `RS512`, `ES256`, `ES384` and `ES512`.

### `rpc-http-authentication-jwt-public-key-file`

<Tabs>
Expand Down Expand Up @@ -4188,6 +4228,46 @@ Enables or disables [authentication](../../how-to/use-besu-api/authenticate.md)

:::

### `rpc-ws-authentication-jwt-algorithm`

<Tabs>

<TabItem value="Syntax" label="Syntax" default>

```bash
---rpc-ws-authentication-jwt-algorithm=<jwt algorithm>
```

</TabItem>

<TabItem value="Example" label="Example">

```bash
--rpc-ws-authentication-jwt-algorithm=ES256
```

</TabItem>

<TabItem value="Environment variable" label="Environment variable">

```bash
BESU_RPC_WS_AUTHENTICATION_JWT_ALGORITHM=ES256
```

</TabItem>

<TabItem value="Configuration file" label="Configuration file">

```bash
rpc-ws-authentication-jwt-algorithm="ES256"
```

</TabItem>

</Tabs>

The [key algorithm](../../how-to/use-besu-api/authenticate#1-generate-a-private-and-public-key-pair) used to generate the keypair for [JWT public key authentication](../../how-to/use-besu-api/authenticate#jwt-public-key-authentication).

### `rpc-ws-authentication-jwt-public-key-file`

<Tabs>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ The [key algorithm](https://datatracker.ietf.org/doc/html/rfc7518#section-3.1) c
- RSA with private key length of at least 2048 bits using algorithm `RS256`, `RS384` or `RS512`.
- ECDSA private key, using `ES256` (`secp256r1` or `secp256k1`), `ES384` or `ES512`.

Besu default is `RS256`.
Besu default is `RS256`. When you use a different key algorithm you must specify the [`--rcp-http-authentication-jwt-algorithm`](../../reference/cli/options#rpc-http-authentication-jwt-algorithm) and/or [`--rcp-ws-authentication-jwt-algorithm`](../../reference/cli/options#rpc-ws-authentication-jwt-algorithm) option depending on your needs.

<Tabs>
<TabItem value="RS256 RSA Keys" label="RS256 RSA Keys" default>
Expand Down
Loading

0 comments on commit f1d5fe7

Please sign in to comment.