Skip to content

Commit

Permalink
Merge 2.8.2-specific docs from apache#12175, apache#11988, apache#11828
Browse files Browse the repository at this point in the history
…, and apache#11681
  • Loading branch information
momo-jun committed Aug 4, 2022
1 parent 890f7c3 commit 8869ffe
Show file tree
Hide file tree
Showing 4 changed files with 51 additions and 4 deletions.
Expand Up @@ -338,6 +338,33 @@ class Example(Record):

```

##### Set namespace for Avro schema

:::note

This setting is only available in 2.8.2 and later versions.

:::

Set the namespace for Avro Record schema using the special field `_avro_namespace`.
```python
class NamespaceDemo(Record):
_avro_namespace = 'xxx.xxx.xxx'
x = String()
y = Integer()
```

The schema definition is like this.
```
{
'name': 'NamespaceDemo', 'namespace': 'xxx.xxx.xxx', 'type': 'record', 'fields': [
{'name': 'x', 'type': ['null', 'string']},
{'name': 'y', 'type': ['null', 'int']}
]
}
```


## End-to-end encryption

[End-to-end encryption](https://pulsar.apache.org/docs/en/next/cookbooks-encryption/#docsNav) allows applications to encrypt messages at producers and decrypt messages at consumers.
Expand Down
Expand Up @@ -568,7 +568,7 @@ Options
|`--replicated`|Whether the subscription status should be replicated|false|
|`-u`, `--service-url`|Pulsar service URL||
|`-i`, `--stats-interval-seconds`|Statistics interval seconds. If 0, statistics will be disabled|0|
|`-s`, `--subscriber-name`|Subscriber name prefix|sub|
|`-s`, `--subscriber-name`|Subscriber name prefix. <br />**Note:** This flag is deprecated in 2.8.2 and later versions. |sub|
|`-ss`, `--subscriptions`|A list of subscriptions to consume on (e.g. sub1,sub2)|sub|
|`-st`, `--subscription-type`|Subscriber type. Possible values are Exclusive, Shared, Failover, Key_Shared.|Exclusive|
|`-sp`, `--subscription-position`|Subscriber position. Possible values are Latest, Earliest.|Latest|
Expand Down
4 changes: 2 additions & 2 deletions site2/website/versioned_docs/version-2.8.x/security-oauth2.md
Expand Up @@ -32,7 +32,7 @@ The following table lists parameters supported for the `client credentials` auth
| `type` | Oauth 2.0 authentication type. | `client_credentials` (default) | Optional |
| `issuerUrl` | URL of the authentication provider which allows the Pulsar client to obtain an access token | `https://accounts.google.com` | Required |
| `privateKey` | URL to a JSON credentials file | Support the following pattern formats: <br /> <li> `file:///path/to/file` </li><li>`file:/path/to/file` </li><li> `data:application/json;base64,<base64-encoded value>` </li>| Required |
| `audience` | An OAuth 2.0 "resource server" identifier for the Pulsar cluster | `https://broker.example.com` | Required |
| `audience` | An OAuth 2.0 "resource server" identifier for the Pulsar cluster | `https://broker.example.com` | Optional |

The credentials file contains service account credentials used with the client authentication type. The following shows an example of a credentials file `credentials_file.json`.

Expand Down Expand Up @@ -71,7 +71,7 @@ In the above example, the mapping relationship is shown as below.

- The `issuerUrl` parameter in this plugin is mapped to `--url https://dev-kt-aa9ne.us.auth0.com`.
- The `privateKey` file parameter in this plugin should at least contains the `client_id` and `client_secret` fields.
- The `audience` parameter in this plugin is mapped to `"audience":"https://dev-kt-aa9ne.us.auth0.com/api/v2/"`.
- The `audience` parameter in this plugin is mapped to `"audience":"https://dev-kt-aa9ne.us.auth0.com/api/v2/"`. This field is optional and only used by some identity providers in 2.8.2 and later versions.

## Client Configuration

Expand Down
Expand Up @@ -146,7 +146,27 @@ brokerClientTlsTrustStorePassword=clientpw

```

NOTE: it is important to restrict access to the store files via filesystem permissions.
:::note

It is important to restrict access to the store files via filesystem permissions.

:::

In 2.8.2 and later versions, if you have configured TLS on the broker, to disable non-TLS ports, you can set the values of the following configurations to empty.

```conf
brokerServicePort=
webServicePort=
```

In this case, you need to set the following configurations.

```conf
brokerClientTlsEnabled=true // Set this to true
brokerClientTlsEnabledWithKeyStore=true // Set this to true
brokerClientTlsTrustStore= // Set this to your desired value
brokerClientTlsTrustStorePassword= // Set this to your desired value
```

Optional settings that may worth consider:

Expand Down

0 comments on commit 8869ffe

Please sign in to comment.