-
Notifications
You must be signed in to change notification settings - Fork 851
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
Added access control public header file. #1300
Added access control public header file. #1300
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Probably AccessControl.md and API.md should be updated to reference this header.
Co-authored-by: Maxim Sharabayko <maxlovic@gmail.com>
docs/AccessControl.md
Outdated
Codes from this range can be only understood if both applications know the | ||
code definitions of the other, and these should be used only after making | ||
sure that both applications understood these codes. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Codes from this range can be only understood if both applications know the | |
code definitions of the other, and these should be used only after making | |
sure that both applications understood these codes. | |
Codes from this range can be only understood if each applications knows the | |
code definitions of the other. These codes should be used only after making | |
sure that both applications understood them. |
docs/AccessControl.md
Outdated
The intention for the predefined codes is to be consistent with the HTTP | ||
standard codes, therefore there are following sub-ranges used: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The intention for the predefined codes is to be consistent with the HTTP | |
standard codes, therefore there are following sub-ranges used: | |
The intention for the predefined codes is to be consistent with HTTP | |
standard codes. Therefore the following sub-ranges are used: |
docs/AccessControl.md
Outdated
* 400 - 599: Client and server errors in HTTP, adopted by SRT | ||
* 600 - 999: unused in SRT | ||
|
||
This code can be set by using the `srt_setrejectreason` function. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This code can be set by using the `srt_setrejectreason` function. | |
Such a code can be set by using the `srt_setrejectreason` function. |
docs/AccessControl.md
Outdated
This code should be set by the callback handler in the beginning in case | ||
when the application needs to be informed that the callback handler | ||
actually has interpreted the incoming connection, but it didn't set any | ||
more appropriate code describing the situation. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This code should be set by the callback handler in the beginning in case | |
when the application needs to be informed that the callback handler | |
actually has interpreted the incoming connection, but it didn't set any | |
more appropriate code describing the situation. | |
This code should be set by the callback handler in the beginning in case | |
the application needs to be informed that the callback handler | |
actually has interpreted the incoming connection, but hasn't set a | |
more appropriate code describing the situation. |
docs/AccessControl.md
Outdated
Authentication failed, which makes the client unauthorized to access the | ||
resource. This error, however, confirms that the syntax is correct and | ||
the resource has been properly identified. Note that this cannot be | ||
reported in case when you use a simple user-password authentication |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
reported in case when you use a simple user-password authentication | |
reported when you use a simple user-password authentication |
docs/AccessControl.md
Outdated
The resource specified in the `r` key (with combination of `h` key) | ||
is not found at this time. This error should be only reported if the | ||
information about resource accessibility is allowed to be publicly | ||
visible, otherwise the application might rather report authorization | ||
errors. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The resource specified in the `r` key (with combination of `h` key) | |
is not found at this time. This error should be only reported if the | |
information about resource accessibility is allowed to be publicly | |
visible, otherwise the application might rather report authorization | |
errors. | |
The resource specified in the `r` key (in combination with the `h` key) | |
is not found at this time. This error should be only reported if the | |
information about resource accessibility is allowed to be publicly | |
visible. Otherwise the application might report authorization | |
errors. |
docs/AccessControl.md
Outdated
### SRT_REJX_CONFLICT | ||
|
||
The resource being accessed is already locked for modification. This error | ||
should only be reported for `m=publish` in case when the resource being |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should only be reported for `m=publish` in case when the resource being | |
should only be reported for `m=publish` when the resource being |
docs/AccessControl.md
Outdated
|
||
### SRT_REJX_UNIMPLEMENTED | ||
|
||
The request was correctly recognized, but the current version doesn't |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"current version" of what? SRT? The application? Both? Later you refer to a "server version". How does this relate to SRT and/or the application?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's all about the server version. The rejection codes concern exclusively a situation when you have a service hanging as "SRT Listener" and a client tries to connect, with having a query specified in the StreamID field. Although yes, it should be clarified that it's about the version of the server application (can be both SRT or any other part of the service software).
docs/AccessControl.md
Outdated
The service is down for maintenance. This can only be reported in | ||
case when the servis has been temporarily replaced by a stub that is only | ||
reporting this error, while the real service is down for maintenance. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The service is down for maintenance. This can only be reported in | |
case when the servis has been temporarily replaced by a stub that is only | |
reporting this error, while the real service is down for maintenance. | |
The service is down for maintenance. This can only be reported | |
when the service has been temporarily replaced by a stub that is only | |
reporting this error, while the real service is down for maintenance. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thought. Might be that all those rejections codes should go to API-functions.md, while AcessControl.md should only have a list and a reference to API-functions.md.
what api should we use to set these rejection reasons ? |
See |
This header file contains now only the predefined rejection codes.
It's also intended to be expanded in future to contain also function headers for utilities that allow to parse the StreamID according to the access control standard syntax.