Skip to content

Commit

Permalink
feat: add SASL security scheme types for use by Kafka specs (#502)
Browse files Browse the repository at this point in the history
* feat: add SASL security scheme types for use by Kafka specs

As discussed in asyncapi/bindings#56 this
adds additional security scheme types. The motivation for adding
them is to enable description of secured Kafka clusters, however
the security protocols and mechanisms being added are not unique
to Kafka, so this commit adds them as generic security schemes so
they could be used by other protocols as well.

Contributes to: #466

Signed-off-by: Dale Lane <dale.lane@uk.ibm.com>

* chore: update for grammar

Moved the "and" to the end of the list.

Signed-off-by: Dale Lane <dale.lane@uk.ibm.com>

* docs: additional SASL documentation

Contributes to: #466

Signed-off-by: Dale Lane <dale.lane@uk.ibm.com>
  • Loading branch information
dalelane committed May 28, 2021
1 parent bbb84c1 commit 8c8e211
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion spec/asyncapi.md
Original file line number Diff line number Diff line change
Expand Up @@ -1961,11 +1961,12 @@ Defines a security scheme that can be used by the operations. Supported schemes
* HTTP API key.
* OAuth2's common flows (Implicit, Resource Owner Protected Credentials, Client Credentials and Authorization Code) as defined in [RFC6749](https://tools.ietf.org/html/rfc6749).
* [OpenID Connect Discovery](https://tools.ietf.org/html/draft-ietf-oauth-discovery-06).
* SASL (Simple Authentication and Security Layer) as defined in [RFC4422](https://tools.ietf.org/html/rfc4422).

##### Fixed Fields
Field Name | Type | Applies To | Description
---|:---:|---|---
<a name="securitySchemeObjectType"></a>type | `string` | Any | **REQUIRED**. The type of the security scheme. Valid values are `"userPassword"`, `"apiKey"`, `"X509"`, `"symmetricEncryption"`, `"asymmetricEncryption"`, `"httpApiKey"`, `"http"`, `oauth2`, and `openIdConnect`.
<a name="securitySchemeObjectType"></a>type | `string` | Any | **REQUIRED**. The type of the security scheme. Valid values are `"userPassword"`, `"apiKey"`, `"X509"`, `"symmetricEncryption"`, `"asymmetricEncryption"`, `"httpApiKey"`, `"http"`, `"oauth2"`, `"openIdConnect"`, `"plain"`, `"scramSha256"`, `"scramSha512"`, and `"gssapi"`.
<a name="securitySchemeObjectDescription"></a>description | `string` | Any | A short description for security scheme. [CommonMark syntax](http://spec.commonmark.org/) MAY be used for rich text representation.
<a name="securitySchemeObjectName"></a>name | `string` | `httpApiKey` | **REQUIRED**. The name of the header, query or cookie parameter to be used.
<a name="securitySchemeObjectIn"></a>in | `string` | `apiKey` \| `httpApiKey` | **REQUIRED**. The location of the API key. Valid values are `"user"` and `"password"` for `apiKey` and `"query"`, `"header"` or `"cookie"` for `httpApiKey`.
Expand Down Expand Up @@ -2101,6 +2102,18 @@ flows:
read:pets: read your pets
```

###### SASL Sample

```json
{
"type": "scramSha512"
}
```

```yaml
type: scramSha512
```

#### <a name="oauthFlowsObject"></a>OAuth Flows Object

Allows configuration of the supported OAuth Flows.
Expand Down

0 comments on commit 8c8e211

Please sign in to comment.