Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add essential Kafka client security config #174

Merged
merged 3 commits into from
Oct 6, 2021

Conversation

dalelane
Copy link
Contributor

@dalelane dalelane commented Oct 2, 2021

This commit updates the generated markdown so that it includes
the essential Kafka config required for clients.

This makes it easier for someone using the markdown doc from an
AsyncAPI doc to get started with creating a Kafka client.

Signed-off-by: Dale Lane [email protected]

This commit updates the generated markdown so that it includes
the essential Kafka config required for clients.

This makes it easier for someone using the markdown doc from an
AsyncAPI doc to get started with creating a Kafka client.

Signed-off-by: Dale Lane <[email protected]>
@dalelane
Copy link
Contributor Author

dalelane commented Oct 2, 2021

inspired by a discussion on Slack
https://asyncapi.slack.com/archives/C0230UAM6R3/p1631889206093800

@dalelane
Copy link
Contributor Author

dalelane commented Oct 2, 2021

Example output:

AsyncAPI:

asyncapi: '2.2.0'
info:
  title: Streetlights Kafka API
  version: '1.0.0'
  description: |
    The Smartylighting Streetlights API allows you to remotely manage the city lights.

servers:
  test:
    url: test.mykafkacluster.org:8092
    protocol: kafka
    description: Test broker

will generate:

# Streetlights Kafka API 1.0.0 documentation

The Smartylighting Streetlights API allows you to remotely manage the city lights.

## Table of Contents

* [Servers](#servers)
* [Channels](#channels)

## Servers

### **test** Server

| URL | Protocol | Description |
|---|---|---|
| test.mykafkacluster.org:8092 | kafka | Test broker |

#### Security Requirements

| Type | Description | security.protocol | sasl.mechanism |
|---|---|---|---|
| - | - | PLAINTEXT | - |

rendered as:


Streetlights Kafka API 1.0.0 documentation

The Smartylighting Streetlights API allows you to remotely manage the city lights.

Table of Contents

Servers

test Server

URL Protocol Description
test.mykafkacluster.org:8092 kafka Test broker

Security Requirements

Type Description security.protocol sasl.mechanism
- - PLAINTEXT -

@dalelane
Copy link
Contributor Author

dalelane commented Oct 2, 2021

Example output:

AsyncAPI:

asyncapi: '2.2.0'
info:
  title: Streetlights Kafka API
  version: '1.0.0'
  description: |
    The Smartylighting Streetlights API allows you to remotely manage the city lights.

servers:
  test:
    url: test.mykafkacluster.org:8092
    protocol: kafka-secure
    description: Test broker

will generate:

# Streetlights Kafka API 1.0.0 documentation

The Smartylighting Streetlights API allows you to remotely manage the city lights.

## Table of Contents

* [Servers](#servers)
* [Channels](#channels)

## Servers

### **test** Server

| URL | Protocol | Description |
|---|---|---|
| test.mykafkacluster.org:8092 | kafka | Test broker |

#### Security Requirements

| Type | Description | security.protocol | sasl.mechanism |
|---|---|---|---|
| - | - | SSL | - |

rendered as:


Streetlights Kafka API 1.0.0 documentation

The Smartylighting Streetlights API allows you to remotely manage the city lights.

Table of Contents

Servers

test Server

URL Protocol Description
test.mykafkacluster.org:8092 kafka Test broker

Security Requirements

Type Description security.protocol sasl.mechanism
- - SSL -

@dalelane
Copy link
Contributor Author

dalelane commented Oct 2, 2021

Example output:

AsyncAPI:

asyncapi: '2.2.0'
info:
  title: Streetlights Kafka API
  version: '1.0.0'
  description: |
    The Smartylighting Streetlights API allows you to remotely manage the city lights.

servers:
  test:
    url: test.mykafkacluster.org:8092
    protocol: kafka-secure
    description: Test broker
    security:
      - saslScram: []

components:
  securitySchemes:
    saslScram:
      type: scramSha512
      description: create credentials in the dev portal

will generate:

# Streetlights Kafka API 1.0.0 documentation

The Smartylighting Streetlights API allows you to remotely manage the city lights.

## Table of Contents

* [Servers](#servers)
* [Channels](#channels)

## Servers

### **test** Server

| URL | Protocol | Description |
|---|---|---|
| test.mykafkacluster.org:8092 | kafka-secure | Test broker |

#### Security Requirements

| Type | Description | security.protocol | sasl.mechanism |
|---|---|---|---|
| scramSha512 | create credentials in the dev portal | SASL_SSL | SCRAM-SHA-512 |

rendered as:


Streetlights Kafka API 1.0.0 documentation

The Smartylighting Streetlights API allows you to remotely manage the city lights.

Table of Contents

Servers

test Server

URL Protocol Description
test.mykafkacluster.org:8092 kafka-secure Test broker

Security Requirements

Type Description security.protocol sasl.mechanism
scramSha512 create credentials in the dev portal SASL_SSL SCRAM-SHA-512

Copy link
Member

@magicmatatjahu magicmatatjahu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@dalelane Thanks for another contribution! :) Only some small suggestions, overall good 👍🏼

components/Servers.js Outdated Show resolved Hide resolved
components/Servers.js Outdated Show resolved Hide resolved
A few minor fixes

Signed-off-by: Dale Lane <[email protected]>
@dalelane
Copy link
Contributor Author

dalelane commented Oct 5, 2021

Thanks for the review! I've added a commit to address the bits you caught.

Copy link
Member

@magicmatatjahu magicmatatjahu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@dalelane Thanks! I don't have any comments to code, it's great :)

@sonarcloud
Copy link

sonarcloud bot commented Oct 6, 2021

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
No Duplication information No Duplication information

@magicmatatjahu magicmatatjahu merged commit 12d520f into asyncapi:master Oct 6, 2021
@asyncapi-bot
Copy link
Contributor

🎉 This PR is included in version 0.15.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

@magicmatatjahu
Copy link
Member

@all-contributors please add @dalelane for code, ideas

@allcontributors
Copy link
Contributor

@magicmatatjahu

I've put up a pull request to add @dalelane! 🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants