- 
                Notifications
    
You must be signed in to change notification settings  - Fork 32
 
🔨 Doc and scripts to create read-only user in PostgreSQL #6426
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
🔨 Doc and scripts to create read-only user in PostgreSQL #6426
Conversation
          Codecov ReportAll modified and coverable lines are covered by tests ✅ 
 Additional details and impacted files@@            Coverage Diff            @@
##           master   #6426      +/-   ##
=========================================
+ Coverage    84.5%   88.2%    +3.6%     
=========================================
  Files          10    1507    +1497     
  Lines         214   62506   +62292     
  Branches       25    2070    +2045     
=========================================
+ Hits          181   55164   +54983     
- Misses         23    7022    +6999     
- Partials       10     320     +310     
 Flags with carried forward coverage won't be shown. Click here to find out more.  | 
    
        
          
                services/postgres/docker-entrypoint-initdb.d/create-readonly-user.sh
              
                Outdated
          
            Show resolved
            Hide resolved
        
              
          
                services/postgres/docker-entrypoint-initdb.d/create-readonly-user.sh
              
                Outdated
          
            Show resolved
            Hide resolved
        
              
          
                services/postgres/docker-entrypoint-initdb.d/create-readonly-user.sh
              
                Outdated
          
            Show resolved
            Hide resolved
        
      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.
nothing more to add form my behalf
9065a59    to
    28fcf62      
    Compare
  
    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.
I am not sure that we can merge this in as-is.
Ideally this PR requires:
- Sister PRs in osparc-ops-deployment-configuration to add those env-vars to the 
repo.config.template. - Potentially a PR in osparc-ops-environments that adds this env-var in the 
simcore/docker-compose*.ymlfiles - Likely there should be a test running periodically to asses that both the readonly user and the admin user login works as expected. This would then also add those credentials to the credentialspage.
 
| 
           Please let us know how you want to proceed :--) we can help/assist.  | 
    
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.
Thank you!
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.
ok as said
          
 | 
    



What do these changes do?
This PR introduces a way to create a read-only user in PostgreSQL databases.
POSTGRES_READONLY_USERandPOSTGRES_READONLY_PASSWORDto define credentials for the read-only user.Provides an initialization script for PostgreSQL services, which runs during the initial setup (i.e., only when the PostgreSQL data directory is empty) to automatically create a read-only user.Related issue/s
How to test
cd services/postgresmake scripts/create-readonly-user.sqlDev-ops checklist
POSTGRES_READONLY_USER,POSTGRES_READONLY_PASSWORDand following steps in osparc-config