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-1398] Update tyk-pump-dashboard-config.md #5078

Merged
merged 2 commits into from
Jul 23, 2024
Merged

Conversation

caroltyk
Copy link
Contributor

@caroltyk caroltyk commented Jul 15, 2024

User description

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



Preview Link


Preview

Description


Fix Dashboard sharding configuration

Screenshots (if appropriate)


Checklist

  • I have added a preview link to the PR description.
  • I have reviewed the suggestions made by our AI (PR Agent) and updated them accordingly (spelling errors, rephrasing, etc.)
  • 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

PR Type

Documentation


Description

  • Updated the Tyk Dashboard configuration example in the documentation.
  • Replaced the old SQL configuration with a new, detailed storage configuration.
  • Added PostgreSQL connection settings for main, analytics, logs, and uptime storage types.
  • Enabled table sharding for all specified storage types.

Changes walkthrough 📝

Relevant files
Documentation
tyk-pump-dashboard-config.md
Update Tyk Dashboard configuration with new storage settings

tyk-docs/content/tyk-pump/tyk-pump-configuration/tyk-pump-dashboard-config.md

  • Updated Tyk Dashboard configuration example.
  • Replaced old SQL configuration with new storage configuration.
  • Added detailed PostgreSQL connection settings.
  • Enabled table sharding for all storage types.
  • +22/-18 

    💡 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 Reviewer Guide 🔍

    ⏱️ Estimated effort to review: 2 🔵🔵⚪⚪⚪
    🧪 No relevant tests
    🔒 Security concerns

    Sensitive information exposure:
    The PR includes hard-coded credentials in the configuration file, which is a security risk. This should be addressed by using environment variables or a secure vault solution to handle sensitive data.

    ⚡ Key issues to review

    Sensitive Information Exposure
    The PR includes hard-coded sensitive information (username and password) in the connection string for the database. This poses a security risk and should be replaced with environment variables or other secure methods of configuration.

    @caroltyk caroltyk changed the title Update tyk-pump-dashboard-config.md [DX-1398] Update tyk-pump-dashboard-config.md Jul 15, 2024
    Copy link
    Contributor

    PR Code Suggestions ✨

    CategorySuggestion                                                                                                                                    Score
    Security
    Replace hardcoded sensitive information with environment variables

    It is recommended to avoid hardcoding sensitive information such as usernames,
    passwords, and database details directly in the configuration files. Instead,
    consider using environment variables or secure vault solutions to manage sensitive
    data securely.

    tyk-docs/content/tyk-pump/tyk-pump-configuration/tyk-pump-dashboard-config.md [444-459]

    -"connection_string": "user=laurentiughiur password=test123 database='tyk-test' host=127.0.0.1 port=5432"
    +"connection_string": "user=${DB_USER} password=${DB_PASSWORD} database=${DB_NAME} host=${DB_HOST} port=${DB_PORT}"
     
    Suggestion importance[1-10]: 10

    Why: This suggestion addresses a significant security concern by replacing hardcoded sensitive information with environment variables, which is a best practice for managing sensitive data securely.

    10
    Enable SSL mode for secure database connections

    To enhance security, consider enabling SSL mode for PostgreSQL connections to ensure
    that data transmitted between the client and server is encrypted.

    tyk-docs/content/tyk-pump/tyk-pump-configuration/tyk-pump-dashboard-config.md [444-459]

    -"connection_string": "user=laurentiughiur password=test123 database='tyk-test' host=127.0.0.1 port=5432"
    +"connection_string": "user=${DB_USER} password=${DB_PASSWORD} database=${DB_NAME} host=${DB_HOST} port=${DB_PORT} sslmode=require"
     
    Suggestion importance[1-10]: 9

    Why: Enabling SSL mode significantly enhances security by ensuring that data transmitted between the client and server is encrypted, which is crucial for protecting sensitive information.

    9
    Maintainability
    Use a shared configuration block for common settings to reduce redundancy

    To maintain consistency and avoid redundancy, consider using a shared configuration
    block for common settings such as the connection string and table sharding,
    especially when the same settings are repeated across different sections.

    tyk-docs/content/tyk-pump/tyk-pump-configuration/tyk-pump-dashboard-config.md [443-460]

    -"type": "postgres",
    -"connection_string": "user=laurentiughiur password=test123 database='tyk-test' host=127.0.0.1 port=5432",
    -"table_sharding": true
    +"default": {
    +  "type": "postgres",
    +  "connection_string": "user=${DB_USER} password=${DB_PASSWORD} database=${DB_NAME} host=${DB_HOST} port=${DB_PORT}",
    +  "table_sharding": true
    +}
     
    Suggestion importance[1-10]: 7

    Why: This suggestion improves maintainability by reducing redundancy in the configuration file, making it easier to manage and update common settings.

    7
    Possible issue
    Correct the database name formatting in the connection string

    Ensure that the database connection strings are properly formatted and do not
    include unnecessary quotes around the database name, as this might cause issues
    depending on the parser or the database driver used.

    tyk-docs/content/tyk-pump/tyk-pump-configuration/tyk-pump-dashboard-config.md [444-459]

    -database='tyk-test'
    +database=tyk-test
     
    Suggestion importance[1-10]: 5

    Why: While the suggestion to remove unnecessary quotes around the database name might be valid, it depends on the parser or database driver used. This is a minor issue compared to security concerns.

    5

    @caroltyk caroltyk requested a review from mativm02 July 15, 2024 11:02
    Copy link

    netlify bot commented Jul 15, 2024

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

    Name Link
    🔨 Latest commit 23ced5a
    🔍 Latest deploy log https://app.netlify.com/sites/tyk-docs/deploys/669f70d95827730008274ff8
    😎 Deploy Preview https://deploy-preview-5078--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.

    Copy link
    Contributor

    @mativm02 mativm02 left a comment

    Choose a reason for hiding this comment

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

    lgtm!

    @dcs3spp dcs3spp added the now label Jul 23, 2024
    @dcs3spp dcs3spp force-pushed the caroltyk-patch-4 branch from 374f63e to 23ced5a Compare July 23, 2024 08:59
    @dcs3spp dcs3spp merged commit 5e72eab into master Jul 23, 2024
    9 checks passed
    @dcs3spp dcs3spp deleted the caroltyk-patch-4 branch July 23, 2024 09:07
    @dcs3spp
    Copy link
    Contributor

    dcs3spp commented Jul 23, 2024

    /release to release-5.4

    Copy link

    tykbot bot commented Jul 23, 2024

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

    tykbot bot pushed a commit that referenced this pull request Jul 23, 2024
    Update tyk-pump-dashboard-config.md
    
    (cherry picked from commit 5e72eab)
    Copy link

    tykbot bot commented Jul 23, 2024

    @dcs3spp Succesfully merged PR

    @dcs3spp
    Copy link
    Contributor

    dcs3spp commented Jul 23, 2024

    /release to release-5.3

    Copy link

    tykbot bot commented Jul 23, 2024

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

    buger added a commit that referenced this pull request Jul 23, 2024
    …#5078)
    
    [DX-1398] Update tyk-pump-dashboard-config.md (#5078)
    
    Update tyk-pump-dashboard-config.md
    tykbot bot pushed a commit that referenced this pull request Jul 23, 2024
    Update tyk-pump-dashboard-config.md
    
    (cherry picked from commit 5e72eab)
    Copy link

    tykbot bot commented Jul 23, 2024

    @dcs3spp Succesfully merged PR

    @dcs3spp
    Copy link
    Contributor

    dcs3spp commented Jul 23, 2024

    /release to release-5.2

    Copy link

    tykbot bot commented Jul 23, 2024

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

    tykbot bot pushed a commit that referenced this pull request Jul 23, 2024
    Update tyk-pump-dashboard-config.md
    
    (cherry picked from commit 5e72eab)
    Copy link

    tykbot bot commented Jul 23, 2024

    @dcs3spp Succesfully merged PR

    buger added a commit that referenced this pull request Jul 23, 2024
    …#5078)
    
    [DX-1398] Update tyk-pump-dashboard-config.md (#5078)
    
    Update tyk-pump-dashboard-config.md
    dcs3spp added a commit that referenced this pull request Jul 23, 2024
    …#5078) (#5113)
    
    Update tyk pump dashboard config
    ---------
    
    Co-authored-by: caroltyk <[email protected]>
    Co-authored-by: dcs3spp <[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