Skip to content

Conversation

@snigdha920
Copy link
Contributor

@snigdha920 snigdha920 commented Oct 15, 2024

Summary by Sourcery

Introduce comprehensive documentation for Application Access Tokens and Personal Access Tokens, replacing the outdated API keys documentation.

Documentation:

  • Add documentation for Application Access Tokens, detailing creation, updating, deletion, and usage.
  • Add documentation for Personal Access Tokens, including creation, deletion, and usage.
  • Remove outdated API keys documentation.

Summary by CodeRabbit

  • New Features
    • Introduced documentation for "Application Access Tokens" and "Personal Access Tokens" to enhance secure connections with SettleMint services.
  • Documentation
    • Removed outdated documentation on API keys and JSON Web Tokens (JWT).
    • Updated guides for creating, updating, and deleting application and personal access tokens, including usage examples.

@linear
Copy link

linear bot commented Oct 15, 2024

ENG-1312 AAT token documentation

  • Create a new page for 'application access token'

@sourcery-ai
Copy link

sourcery-ai bot commented Oct 15, 2024

Reviewer's Guide by Sourcery

This pull request introduces documentation for Application Access Tokens (AAT) and updates the existing documentation for Personal Access Tokens (PAT). The changes focus on providing detailed information about creating, updating, using, and managing these tokens for secure access to SettleMint services.

User journey diagram for managing application access tokens

journey
    title Managing Application Access Tokens
    section Create Token
      User: Go to application dashboard -> 1
      User: Click on "App access tokens" -> 2
      User: Click "Add an application access token" -> 3
      User: Fill in token details -> 4
      User: Click "Confirm" -> 5
    section Update Token
      User: Navigate to application -> 1
      User: Click "App Access Tokens" -> 2
      User: Click "View scopes" -> 3
      User: Click "Update" -> 4
      User: Choose new scopes -> 5
      User: Click "Confirm" -> 6
    section Delete Token
      User: Navigate to application dashboard -> 1
      User: Click "App Access Tokens" -> 2
      User: Click "Delete" -> 3
      User: Type "DELETE" to confirm -> 4
Loading

File-Level Changes

Change Details Files
Introduction of Application Access Tokens (AAT) documentation
  • Explain the purpose and scope of Application Access Tokens
  • Provide step-by-step instructions for creating an AAT
  • Detail the process of updating an AAT's scopes
  • Describe the procedure for deleting an AAT
  • Outline three methods for using an AAT in API requests
docs/using-platform/19_application-access-tokens.md
Update and expansion of Personal Access Tokens (PAT) documentation
  • Clarify the purpose and scope of Personal Access Tokens
  • Provide step-by-step instructions for creating a PAT
  • Describe the procedure for deleting a PAT
  • Outline three methods for using a PAT in API requests
  • Compare the use cases for AAT vs PAT
docs/using-platform/20_personal-access-tokens.md
Removal of outdated API keys documentation
  • Delete the old API keys documentation file
docs/using-platform/19_api-keys.md

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time. You can also use
    this command to specify where the summary should be inserted.

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@coderabbitai
Copy link

coderabbitai bot commented Oct 15, 2024

Walkthrough

The pull request involves significant changes to the documentation related to API keys and access tokens within the SettleMint platform. The file 19_api-keys.md has been deleted, while a new document 19_application-access-tokens.md has been added to introduce Application Access Tokens. Additionally, a new document 20_personal-access-tokens.md has been created to describe Personal Access Tokens. The file 21_JWT.md has also been deleted, which previously contained information on JSON Web Tokens.

Changes

File Path Change Summary
docs/using-platform/19_api-keys.md Deleted; contained documentation on API key usage, including generation, deletion, and utilization.
docs/using-platform/19_application-access-tokens.md Added; introduces Application Access Tokens, detailing creation, updating, deletion, and usage methods.
docs/using-platform/20_personal-access-tokens.md Added; describes Personal Access Tokens, including creation, deletion, and usage methods.
docs/using-platform/21_JWT.md Deleted; provided documentation on configuring and using JSON Web Tokens within the platform.

Possibly related PRs

  • settlemint/btp#3917: This PR introduces a feature for managing application access tokens, which is directly related to the new documentation on "Application Access Tokens" in the main PR. Both focus on the creation, management, and usage of application access tokens within the SettleMint platform.

Poem

In the garden of code, where tokens bloom,
Access and secrets, dispelling the gloom.
API keys vanished, replaced with a guide,
For apps and for users, with tokens we stride.
Securely we hop, through the digital maze,
Celebrating changes, in tech's wondrous ways! 🐇✨


🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@github-actions github-actions bot added the feat New feature label Oct 15, 2024
Copy link

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

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

Hey @snigdha920 - I've reviewed your changes and they look great!

Here's what I looked at during the review
  • 🟢 General issues: all looks good
  • 🟢 Security: all looks good
  • 🟢 Review instructions: all looks good
  • 🟢 Testing: all looks good
  • 🟢 Complexity: all looks good
  • 🟡 Documentation: 1 issue found

Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🧹 Outside diff range and nitpick comments (5)
docs/using-platform/20_personal-access-tokens.md (3)

1-20: LGTM with a minor suggestion

The introduction and creation process for personal access tokens are well-explained and easy to follow. The security warning is appropriately emphasized.

Consider adding a hyphen in "upper-right" for consistency:

-In the upper right corner of any page, click your **profile picture or avatar**, and then click **Personal access tokens**.
+In the upper-right corner of any page, click your **profile picture or avatar**, and then click **Personal access tokens**.
🧰 Tools
🪛 LanguageTool

[uncategorized] ~7-~7: Consider adding a hyphen.
Context: ... Create a personal access token In the upper right corner of any page, click your **profil...

(TOP_LEFT_CORNER)


[duplication] ~15-~15: Possible typo: you repeated a word
Context: ... create your personal access token. :::warning Warning Copy and save your token securely - yo...

(ENGLISH_WORD_REPEAT_RULE)


29-37: Consider consolidating token usage information

The usage instructions for personal access tokens are clear and provide good examples. However, as noted in a previous review, this section is very similar to the corresponding section in the application access tokens file.

To improve maintainability and reduce duplication, consider one of these options:

  1. Cross-reference the "Use an application access token" section in the Application Access Tokens documentation.
  2. Create a shared document for token usage that both personal and application access token documents can reference.

Example of option 1:

## Use a personal access token

Personal access tokens can be used in the same ways as application access tokens. For detailed information on how to use these tokens, please refer to the "Use an application access token" section in the [Application Access Tokens](19_application-access-tokens.md#use-an-application-access-token) documentation.

Note: The usage methods are identical for both personal and application access tokens.
🧰 Tools
🪛 LanguageTool

[uncategorized] ~31-~31: Possible missing comma found.
Context: ...e these personal access tokens in three ways depending on what works for your use ca...

(AI_HYDRA_LEO_MISSING_COMMA)


[style] ~35-~35: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...om/?token=TOKENappended to any URL. - As the last part of the URLhttps://myser...

(ENGLISH_WORD_REPEAT_BEGINNING_RULE)


1-43: Excellent documentation with minor suggestions for improvement

Overall, this document provides comprehensive and well-structured information about personal access tokens. It covers creation, deletion, usage, and comparison with application access tokens effectively.

Consider a final proofreading to address minor language issues:

  1. Check for consistent hyphenation (e.g., "upper-right" in line 7).
  2. Review the use of colons and semicolons for consistency.
  3. Ensure proper capitalization throughout the document.

These minor improvements will further enhance the already high-quality documentation.

🧰 Tools
🪛 LanguageTool

[uncategorized] ~7-~7: Consider adding a hyphen.
Context: ... Create a personal access token In the upper right corner of any page, click your **profil...

(TOP_LEFT_CORNER)


[duplication] ~15-~15: Possible typo: you repeated a word
Context: ... create your personal access token. :::warning Warning Copy and save your token securely - yo...

(ENGLISH_WORD_REPEAT_RULE)


[uncategorized] ~31-~31: Possible missing comma found.
Context: ...e these personal access tokens in three ways depending on what works for your use ca...

(AI_HYDRA_LEO_MISSING_COMMA)


[style] ~35-~35: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...om/?token=TOKENappended to any URL. - As the last part of the URLhttps://myser...

(ENGLISH_WORD_REPEAT_BEGINNING_RULE)

docs/using-platform/19_application-access-tokens.md (2)

5-23: LGTM: Comprehensive instructions for token creation

The step-by-step guide for creating an application access token is clear and informative. The inclusion of important details about scope types and the warning about token security are particularly valuable.

Consider rewording the sentences starting with "If you selected" on lines 14-15 to avoid repetition:

-   1. If you selected **All**, you grant access to all services of the application. If you add more services to the application later, this access token will grant access to these new services as well.
-   2. If you selected **Specific**, you can choose which specific services this access token will grant access to.
+   1. Selecting **All** grants access to all services of the application, including any new services added later.
+   2. Choosing **Specific** allows you to select which particular services this access token will grant access to.
🧰 Tools
🪛 LanguageTool

[style] ~15-~15: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...ss to these new services as well. 2. If you selected Specific, you can choo...

(ENGLISH_WORD_REPEAT_BEGINNING_RULE)


[duplication] ~19-~19: Possible typo: you repeated a word
Context: ...eate your application access token. :::warning Warning Copy and save your token securely - yo...

(ENGLISH_WORD_REPEAT_RULE)


44-52: LGTM with suggestions: Clear token usage instructions

The section effectively explains the three ways to use an application access token and provides helpful examples for different services.

Consider the following formatting improvements for better readability:

  1. Use consistent formatting for code examples (preferably inline code blocks).
  2. Separate the service-specific examples into a sub-list for clarity.

Here's a suggested revision:

You can use these application access tokens in three ways depending on what works for your use case:

- As a header: Use the header `x-auth-token: TOKEN`.
- As a query parameter: Append `?token=TOKEN` to any URL, e.g., `https://myservice.settlemint.com/?token=TOKEN`.
- As the last part of the URL: `https://myservice.settlemint.com/TOKEN`.

For specific services:
  - IPFS nodes: Build your URI as `https://myservice.settlemint.com/TOKEN/api/v0/...`
  - Avalanche and Fuji: Build your URI as `https://myservice.settlemint.com/ext/bc/C/rpc/TOKEN`
🧰 Tools
🪛 LanguageTool

[style] ~50-~50: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...om/?token=TOKENappended to any URL. - As the last part of the URLhttps://myser...

(ENGLISH_WORD_REPEAT_BEGINNING_RULE)

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

📥 Commits

Files that changed from the base of the PR and between 9cfec9b and 69d5883.

📒 Files selected for processing (4)
  • docs/using-platform/19_api-keys.md (0 hunks)
  • docs/using-platform/19_application-access-tokens.md (1 hunks)
  • docs/using-platform/20_personal-access-tokens.md (1 hunks)
  • docs/using-platform/21_JWT.md (0 hunks)
💤 Files with no reviewable changes (2)
  • docs/using-platform/19_api-keys.md
  • docs/using-platform/21_JWT.md
🧰 Additional context used
🪛 LanguageTool
docs/using-platform/19_application-access-tokens.md

[style] ~15-~15: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...ss to these new services as well. 2. If you selected Specific, you can choo...

(ENGLISH_WORD_REPEAT_BEGINNING_RULE)


[duplication] ~19-~19: Possible typo: you repeated a word
Context: ...eate your application access token. :::warning Warning Copy and save your token securely - yo...

(ENGLISH_WORD_REPEAT_RULE)


[uncategorized] ~31-~31: Consider adding a hyphen.
Context: ...he token. 3. Click on Update in the bottom right corner to open a form where you can upd...

(TOP_LEFT_CORNER)


[style] ~50-~50: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...om/?token=TOKENappended to any URL. - As the last part of the URLhttps://myser...

(ENGLISH_WORD_REPEAT_BEGINNING_RULE)

docs/using-platform/20_personal-access-tokens.md

[uncategorized] ~7-~7: Consider adding a hyphen.
Context: ... Create a personal access token In the upper right corner of any page, click your **profil...

(TOP_LEFT_CORNER)


[duplication] ~15-~15: Possible typo: you repeated a word
Context: ... create your personal access token. :::warning Warning Copy and save your token securely - yo...

(ENGLISH_WORD_REPEAT_RULE)


[uncategorized] ~31-~31: Possible missing comma found.
Context: ...e these personal access tokens in three ways depending on what works for your use ca...

(AI_HYDRA_LEO_MISSING_COMMA)


[style] ~35-~35: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...om/?token=TOKENappended to any URL. - As the last part of the URLhttps://myser...

(ENGLISH_WORD_REPEAT_BEGINNING_RULE)

🔇 Additional comments (5)
docs/using-platform/20_personal-access-tokens.md (2)

21-28: LGTM: Clear instructions for token deletion

The section on deleting personal access tokens is well-written and provides clear, step-by-step instructions. It also explains the scenarios when a user might want to delete a token, which is helpful context.


39-43: LGTM: Clear comparison of token types

This section effectively compares personal and application access tokens, providing clear guidance on when to use each type. The explanation of the advantages and potential issues with each token type is concise and informative.

docs/using-platform/19_application-access-tokens.md (3)

1-3: LGTM: Clear and concise introduction

The introduction effectively explains the purpose and scope of Application Access Tokens. It provides users with a good understanding of what these tokens are and how they can be used.


25-33: LGTM: Clear instructions for updating tokens

The process for updating an application access token is well-explained and easy to follow. The step-by-step instructions provide a clear guide for users to modify token scopes.

🧰 Tools
🪛 LanguageTool

[uncategorized] ~31-~31: Consider adding a hyphen.
Context: ...he token. 3. Click on Update in the bottom right corner to open a form where you can upd...

(TOP_LEFT_CORNER)


35-42: LGTM: Well-explained token deletion process

The instructions for deleting an application access token are clear and include an important safety measure (typing "DELETE" to confirm). This helps prevent accidental deletions and ensures users understand the permanence of their action.

@SilVdB SilVdB merged commit da241e7 into main Oct 16, 2024
@SilVdB SilVdB deleted the snigdha/eng-1312-aat-token-documentation branch October 16, 2024 13:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feat New feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants