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

[DX-1097] Update SessionState protobuf documentation to include BasicAuthData and example hash algorithms #4324

Merged
merged 9 commits into from
Apr 24, 2024

Conversation

dcs3spp
Copy link
Contributor

@dcs3spp dcs3spp commented Mar 25, 2024

User description

For internal users - Please add a Jira DX PR ticket to the subject!

DX-1097


Preview Link

preview

Description

Update SessionState protobuf documentation to include BasicAuthData and example hash algorithms

Screenshots (if appropriate)


Checklist

  • I have added a preview link to the PR description.
  • I have reviewed the guidelines for contributing to this repository.
  • I have read the technical guidelines for contributing to this repository.
  • Make sure you have started your change off our latest master.
  • I labelled the PR

Type

documentation


Description

  • Added detailed documentation for BasicAuthData within the SessionState protobuf, including fields and example hashing algorithms.
  • Clarified that basic_auth_data contains a hashed password and the hashing method, enhancing the understanding of basic auth data handling.

Changes walkthrough

Relevant files
Documentation
rich-plugins-data-structures.md
Enhanced SessionState Protobuf Documentation with BasicAuthData
Details

tyk-docs/content/plugins/supported-languages/rich-plugins/rich-plugins-data-structures.md

  • Added a detailed description for BasicAuthData in the SessionState
    protobuf documentation.
  • Updated the basic_auth_data section to clarify it contains a hashed
    password and the hashing method used.
  • Included examples of hashing algorithms.
  • +22/-2   

    PR-Agent usage:
    Comment /help on the PR to get a list of all available PR-Agent tools and their descriptions

    Copy link
    Contributor

    PR Description updated to latest commit (a2c7a3a)

    Copy link
    Contributor

    PR Review

    ⏱️ Estimated effort to review [1-5]

    2, because the PR mainly involves documentation updates, which are generally quicker to review than code changes. However, ensuring the accuracy of the documentation and its consistency with the actual implementation requires careful attention.

    🧪 Relevant tests

    No

    🔍 Possible issues

    No

    🔒 Security concerns

    No

    Code feedback:

    ✨ Review tool usage guide:

    Overview:
    The review tool scans the PR code changes, and generates a PR review which includes several types of feedbacks, such as possible PR issues, security threats and relevant test in the PR. More feedbacks can be added by configuring the tool.

    The tool can be triggered automatically every time a new PR is opened, or can be invoked manually by commenting on any PR.

    • When commenting, to edit configurations related to the review tool (pr_reviewer section), use the following template:
    /review --pr_reviewer.some_config1=... --pr_reviewer.some_config2=...
    
    [pr_reviewer]
    some_config1=...
    some_config2=...
    

    See the review usage page for a comprehensive guide on using this tool.

    Copy link
    Contributor

    github-actions bot commented Mar 25, 2024

    PR Code Suggestions

    CategorySuggestions                                                                                                                                                       
    Enhancement
    Add examples of hash values and hashing algorithms to the BasicAuthData documentation.

    Consider adding examples of hash values for the password field and specific hashing
    algorithms for the hash field to provide clearer guidance for users on how to format their
    data.

    tyk-docs/content/plugins/supported-languages/rich-plugins/rich-plugins-data-structures.md [320-323]

     ```yaml
     "basicAuthData": {
    -    "password": "a_hashed_password_presentation",
    -    "hash": "the_hashing_algorithm_used_to_hash_the_password"
    +    "password": "example_hashed_password_with_bcrypt",
    +    "hash": "bcrypt"
     }
                       
    </details></td></tr><tr><td>
    
    
    
    <details><summary>Add a table of contents for better document navigation.</summary>
    
    ___
    
    
    **To improve the readability and accessibility of the documentation, consider adding a table <br>of contents at the beginning of the document. This would help users quickly navigate to <br>sections of interest, especially in a long document.**
        
    [tyk-docs/content/plugins/supported-languages/rich-plugins/rich-plugins-data-structures.md [223]](https://github.com/TykTechnologies/tyk-docs/pull/4324/files#diff-145c1da09aa93cd7b1fbd3d9c15f65dbc8f633eaac8461743fbe2fe98dd81037R223-R223)
    
    ```diff
    -This section contains a hashed representation of the basic auth password and the hashing method used.
    +[Table of Contents]
    +- SessionState
    +- BasicAuthData
    +- JWTData
    +...
     
    
    Maintainability
    Use consistent terminology for "hashing algorithm" in the documentation.

    To maintain consistency and clarity in the documentation, consider using a consistent term
    for "hashing algorithm" or "hashing method" throughout the document. This helps in
    avoiding confusion among readers.

    tyk-docs/content/plugins/supported-languages/rich-plugins/rich-plugins-data-structures.md [223]

    -This section contains a hashed representation of the basic auth password and the hashing method used.
    +This section contains a hashed representation of the basic auth password and the hashing algorithm used.
     
    Add a contribution guide to encourage community involvement in documentation updates.

    To ensure the documentation remains relevant and useful, consider adding a note or section
    that guides users on how to contribute updates or corrections. This could include a link
    to the repository or instructions on submitting issues or pull requests.

    tyk-docs/content/plugins/supported-languages/rich-plugins/rich-plugins-data-structures.md [224]

    -For further details see [BasicAuthData](#basicauthdata-coprocess_session_stateproto).
    +For further details see [BasicAuthData](#basicauthdata-coprocess_session_stateproto). If you have suggestions for improvements or corrections, please see our contribution guidelines [here](#).
     
    Security
    Recommend secure hashing algorithms in the BasicAuthData section for better security.

    For the BasicAuthData section, it's beneficial to mention the security implications of
    choosing a hashing algorithm and to recommend using secure, modern algorithms like bcrypt
    or Argon2.

    tyk-docs/content/plugins/supported-languages/rich-plugins/rich-plugins-data-structures.md [332]

    -Name of the hashing algorithm used to hash the password, e.g. *bcrypt*, *Argon2*.
    +Name of the hashing algorithm used to hash the password. It's recommended to use secure, modern algorithms like *bcrypt* or *Argon2* for enhanced security.
     

    ✨ Improve tool usage guide:

    Overview:
    The improve tool scans the PR code changes, and automatically generates suggestions for improving the PR code. The tool can be triggered automatically every time a new PR is opened, or can be invoked manually by commenting on a PR.

    • When commenting, to edit configurations related to the improve tool (pr_code_suggestions section), use the following template:
    /improve --pr_code_suggestions.some_config1=... --pr_code_suggestions.some_config2=...
    
    [pr_code_suggestions]
    some_config1=...
    some_config2=...
    

    See the improve usage page for a comprehensive guide on using this tool.

    Copy link

    netlify bot commented Mar 25, 2024

    PS. Pls add /docs/nightly to the end of url

    Name Link
    🔨 Latest commit 7ad9890
    🔍 Latest deploy log https://app.netlify.com/sites/tyk-docs/deploys/662935208c96b60008b371ae
    😎 Deploy Preview https://deploy-preview-4324--tyk-docs.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.

    @dcs3spp dcs3spp requested review from sedkis, lghiur and asoorm March 25, 2024 12:32
    @dcs3spp dcs3spp requested review from titpetric and removed request for asoorm, lghiur and sedkis April 15, 2024 14:34
    @dcs3spp dcs3spp merged commit f46951d into master Apr 24, 2024
    10 checks passed
    @dcs3spp dcs3spp deleted the simon-dx-1097 branch April 24, 2024 16:39
    @dcs3spp
    Copy link
    Contributor Author

    dcs3spp commented Apr 24, 2024

    /release to release-5.3

    @dcs3spp
    Copy link
    Contributor Author

    dcs3spp commented Apr 24, 2024

    /release to release-5.2

    Copy link

    tykbot bot commented Apr 24, 2024

    Working on it! Note that it can take a few minutes.

    1 similar comment
    Copy link

    tykbot bot commented Apr 24, 2024

    Working on it! Note that it can take a few minutes.

    tykbot bot pushed a commit that referenced this pull request Apr 24, 2024
    …AuthData and example hash algorithms (#4324)
    
    * update basic_auth with hashed password and add BasicAuthData example
    ---------
    
    Co-authored-by: Simon Pears <[email protected]>
    Co-authored-by: Yaara <[email protected]>
    
    (cherry picked from commit f46951d)
    Copy link

    tykbot bot commented Apr 24, 2024

    @dcs3spp Succesfully merged PR

    tykbot bot pushed a commit that referenced this pull request Apr 24, 2024
    …AuthData and example hash algorithms (#4324)
    
    * update basic_auth with hashed password and add BasicAuthData example
    ---------
    
    Co-authored-by: Simon Pears <[email protected]>
    Co-authored-by: Yaara <[email protected]>
    
    (cherry picked from commit f46951d)
    @dcs3spp
    Copy link
    Contributor Author

    dcs3spp commented Apr 24, 2024

    /release to release-5.1

    Copy link

    tykbot bot commented Apr 24, 2024

    @dcs3spp Succesfully merged PR

    Copy link

    tykbot bot commented Apr 24, 2024

    Working on it! Note that it can take a few minutes.

    tykbot bot pushed a commit that referenced this pull request Apr 24, 2024
    …AuthData and example hash algorithms (#4324)
    
    * update basic_auth with hashed password and add BasicAuthData example
    ---------
    
    Co-authored-by: Simon Pears <[email protected]>
    Co-authored-by: Yaara <[email protected]>
    
    (cherry picked from commit f46951d)
    Copy link

    tykbot bot commented Apr 24, 2024

    @dcs3spp Succesfully merged PR

    buger added a commit that referenced this pull request Apr 24, 2024
    …ntation to include BasicAuthData and example hash algorithms (#4324)
    
    [DX-1097] Update SessionState protobuf documentation to include BasicAuthData and example hash algorithms (#4324)
    
    * update basic_auth with hashed password and add BasicAuthData example
    ---------
    
    Co-authored-by: Simon Pears <[email protected]>
    Co-authored-by: Yaara <[email protected]>
    buger added a commit that referenced this pull request Apr 24, 2024
    …ntation to include BasicAuthData and example hash algorithms (#4324)
    
    [DX-1097] Update SessionState protobuf documentation to include BasicAuthData and example hash algorithms (#4324)
    
    * update basic_auth with hashed password and add BasicAuthData example
    ---------
    
    Co-authored-by: Simon Pears <[email protected]>
    Co-authored-by: Yaara <[email protected]>
    @dcs3spp
    Copy link
    Contributor Author

    dcs3spp commented Apr 24, 2024

    /release to release-5

    Copy link

    tykbot bot commented Apr 24, 2024

    Working on it! Note that it can take a few minutes.

    tykbot bot pushed a commit that referenced this pull request Apr 24, 2024
    …AuthData and example hash algorithms (#4324)
    
    * update basic_auth with hashed password and add BasicAuthData example
    ---------
    
    Co-authored-by: Simon Pears <[email protected]>
    Co-authored-by: Yaara <[email protected]>
    
    (cherry picked from commit f46951d)
    buger added a commit that referenced this pull request Apr 24, 2024
    …ntation to include BasicAuthData and example hash algorithms (#4324)
    
    [DX-1097] Update SessionState protobuf documentation to include BasicAuthData and example hash algorithms (#4324)
    
    * update basic_auth with hashed password and add BasicAuthData example
    ---------
    
    Co-authored-by: Simon Pears <[email protected]>
    Co-authored-by: Yaara <[email protected]>
    Copy link

    tykbot bot commented Apr 24, 2024

    @dcs3spp Succesfully merged PR

    buger added a commit that referenced this pull request Apr 24, 2024
    …ation to include BasicAuthData and example hash algorithms (#4324)
    
    [DX-1097] Update SessionState protobuf documentation to include BasicAuthData and example hash algorithms (#4324)
    
    * update basic_auth with hashed password and add BasicAuthData example
    ---------
    
    Co-authored-by: Simon Pears <[email protected]>
    Co-authored-by: Yaara <[email protected]>
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Projects
    None yet
    Development

    Successfully merging this pull request may close these issues.

    3 participants