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

docs: adding document for servers' security #2231

Merged
merged 8 commits into from
Nov 16, 2023

Conversation

TRohit20
Copy link
Collaborator

Description

As part of Google Season of Docs 2023 at AsyncAPI, we're going to write in-depth explanations of the different sections of an AsyncAPI document to avoid difficulties in implementing EDAs.

For this document issue, we'll be adding document about adding the security to servers or securing servers in a AsyncAPI document.

Related issue
This task is part of the GSoD Docs EPIC: #1507.
Resolves #1715

Screenshot 2023-10-14 at 6 26 13 AM

@netlify
Copy link

netlify bot commented Oct 14, 2023

Deploy Preview for shimmering-choux-eb0798 ready!

Name Link
🔨 Latest commit 9c5a07d
🔍 Latest deploy log https://app.netlify.com/sites/shimmering-choux-eb0798/deploys/65558ae3f37f4d00089a89b3
😎 Deploy Preview https://deploy-preview-2231--shimmering-choux-eb0798.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@TRohit20 TRohit20 requested a review from derberg October 25, 2023 07:05
Copy link
Member

@derberg derberg left a comment

Choose a reason for hiding this comment

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

  • if you know if someone is working on document for security on operation level, please make sure folks you cross link these documents
  • for the examples of schemes, please make sure code with yaml has proper indentation, like you have in lines 72-74 so later when docs are rendered, the code snippet looks like a part of a bullet
  • please talk with other writers, especially with @mhmohona so you align on the approach with diagrams, to assure consistency as looks like you folks do it different per PR

@derberg
Copy link
Member

derberg commented Oct 26, 2023

for the examples of schemes, please make sure code with yaml has proper indentation, like you have in lines 72-74 so later when docs are rendered, the code snippet looks like a part of a bullet

I think you missed this comment

diagrams are still not consistent, in this PR you start diagram with Server not asyncapi and with upper case, but in https://github.com/asyncapi/website/pull/1957/files you start with asyncapi. Also in this PR you have approach where you show nodes as multiple custom servers (like not asyncapi spec structure but I think asyncapi document structure) but in the other PR you have tag as tag object, keeping asyncapi spec structure.

did you have a discussion I asked for in docs group, to agree on one way of doing these diagrams for AsyncAPI Document structur? they need to be consistent across all docs

derberg
derberg previously approved these changes Nov 15, 2023
Copy link
Member

@derberg derberg left a comment

Choose a reason for hiding this comment

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

Made changes directly with 4265bba

  • update diagram to match others like from tags PR
  • and some indentations as without them it renders bad in preview, examples not part of bullet points

Screenshot 2023-11-15 at 17 15 33

@alequetzalli ready for your final review and approval to merge

@@ -0,0 +1,115 @@
---
title: Server Security
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
title: Server Security
title: Server security


In the context of AsyncAPI, securing servers ensures secure exchange of messages between clients and servers. While also protecting sensitive data, preventing unauthorized access, and maintaining the overall security of the API or server.

You can describe how is your server secured with `security` property where you define which security schemes can be used with the server in context. Each `server` in the AsyncAPI document can have one or more security schemes declared. A security scheme defines a security requirement that must be satisfied to authorize an operation, such as a API key or username and password.
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
You can describe how is your server secured with `security` property where you define which security schemes can be used with the server in context. Each `server` in the AsyncAPI document can have one or more security schemes declared. A security scheme defines a security requirement that must be satisfied to authorize an operation, such as a API key or username and password.
You can describe how your server is secured with the `security` property where you define which security schemes can be used with the server in context. Each `server` in the AsyncAPI document can have one or more security schemes declared. A security scheme defines a security requirement that must be satisfied to authorize an operation, such as an API key or a username and password.


You can describe how is your server secured with `security` property where you define which security schemes can be used with the server in context. Each `server` in the AsyncAPI document can have one or more security schemes declared. A security scheme defines a security requirement that must be satisfied to authorize an operation, such as a API key or username and password.

Here is a example of adding security to your server that shows that different server can have different security mechanisms:
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
Here is a example of adding security to your server that shows that different server can have different security mechanisms:
Here is an example of adding security to your server, demonstrating that different servers can employ various security mechanisms:

description: Download the certificate files from service provider
```

Here is a illustration of securing servers:
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
Here is a illustration of securing servers:
Here is an illustration of securing servers:

type: scramSha512
```

Although, the `security` property is not mandatory to be implemented, it is a good practise to always secure your server(s) in production. Similarly, having multiple security schemes declared does not necessarily mean that the server is more secure, it really depends on other factors such as the protocol used, use case, business perspective and more. Additionally, you can also [add security on the `operation` level](securing-operations)
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
Although, the `security` property is not mandatory to be implemented, it is a good practise to always secure your server(s) in production. Similarly, having multiple security schemes declared does not necessarily mean that the server is more secure, it really depends on other factors such as the protocol used, use case, business perspective and more. Additionally, you can also [add security on the `operation` level](securing-operations)
Although the `security` property is not mandatory, it is a good practice to always secure your server(s) in production. Similarly, having multiple security schemes declared does not necessarily mean that the server is more secure; it depends on other factors such as the protocol used, use case, business perspective, and more. Additionally, you can also [add security at the `operation` level](securing-operations).

@quetzalliwrites
Copy link
Member

/rtm

@asyncapi-bot asyncapi-bot merged commit 8f5b024 into asyncapi:next-major-spec Nov 16, 2023
10 checks passed
quetzalliwrites added a commit that referenced this pull request Nov 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants