samagra-comms / docker-deploy

1 stars 15 forks source link

Fusionauth minio setup #53

Closed RyanWalker277 closed 1 year ago

RyanWalker277 commented 1 year ago

Fixes #52

This PR completes the setup of minio for OpenId auth through fusionauth. The next PR would completely close #52 by adding a kickstart for automatic creation of a fusionauth application through kickstart

gitguardian[bot] commented 1 year ago

⚠️ GitGuardian has uncovered 9 secrets following the scan of your pull request.

Please consider investigating the findings and remediating the incidents. Failure to do so may lead to compromising the associated services or software components.

🔎 Detected hardcoded secrets in your pull request
| GitGuardian id | Secret | Commit | Filename | | | -------------- | ------------------------- | ---------------- | --------------- | -------------------- | | [-](https://dashboard.gitguardian.com/incidents/secrets) | Generic High Entropy Secret | 8bce23b5c72fac6fd17d1196fd0706c4dfaa80fd | env.dev/minio.env | [View secret](https://github.com/samagra-comms/docker-deploy/commit/8bce23b5c72fac6fd17d1196fd0706c4dfaa80fd#diff-3bfeef8685c03fb0abbf0b8295c32704L5) | | [-](https://dashboard.gitguardian.com/incidents/secrets) | Generic Password | 8bce23b5c72fac6fd17d1196fd0706c4dfaa80fd | env.dev/minio.env | [View secret](https://github.com/samagra-comms/docker-deploy/commit/8bce23b5c72fac6fd17d1196fd0706c4dfaa80fd#diff-3bfeef8685c03fb0abbf0b8295c32704L2) | | [-](https://dashboard.gitguardian.com/incidents/secrets) | Generic High Entropy Secret | 8c1362f8523fdbe067661c629e5aaf241813dade | .env | [View secret](https://github.com/samagra-comms/docker-deploy/commit/8c1362f8523fdbe067661c629e5aaf241813dade#diff-f579cccc964135c7d644c7b2d3b0d3ecL22) | | [-](https://dashboard.gitguardian.com/incidents/secrets) | Generic High Entropy Secret | 8c1362f8523fdbe067661c629e5aaf241813dade | env.dev/minio.env | [View secret](https://github.com/samagra-comms/docker-deploy/commit/8c1362f8523fdbe067661c629e5aaf241813dade#diff-3bfeef8685c03fb0abbf0b8295c32704R5) | | [-](https://dashboard.gitguardian.com/incidents/secrets) | Generic Password | 8c1362f8523fdbe067661c629e5aaf241813dade | env.dev/minio.env | [View secret](https://github.com/samagra-comms/docker-deploy/commit/8c1362f8523fdbe067661c629e5aaf241813dade#diff-3bfeef8685c03fb0abbf0b8295c32704R2) | | [-](https://dashboard.gitguardian.com/incidents/secrets) | Generic High Entropy Secret | 8c1362f8523fdbe067661c629e5aaf241813dade | kickstart/kickstart.json | [View secret](https://github.com/samagra-comms/docker-deploy/commit/8c1362f8523fdbe067661c629e5aaf241813dade#diff-227dcfb835ad49ab9dc6ef73be35bb39L7) | | [-](https://dashboard.gitguardian.com/incidents/secrets) | Generic High Entropy Secret | 117380025d8ef2f55bbcce7bbe8f945279f0af76 | kickstart/kickstart.json | [View secret](https://github.com/samagra-comms/docker-deploy/commit/117380025d8ef2f55bbcce7bbe8f945279f0af76#diff-227dcfb835ad49ab9dc6ef73be35bb39R7) | | [934781](https://dashboard.gitguardian.com/incidents/934781?occurrence=92749500) | Generic High Entropy Secret | c67da57c8830547baa362b11c2660056a1fed4f1 | .env | [View secret](https://github.com/samagra-comms/docker-deploy/commit/c67da57c8830547baa362b11c2660056a1fed4f1#diff-e9cbb0224c4a3d23a6019ba557e0cd568c1ad5e1582ff1e335fb7d99b7a1055dL71) | | [934781](https://dashboard.gitguardian.com/incidents/934781?occurrence=92749499) | Generic High Entropy Secret | c67da57c8830547baa362b11c2660056a1fed4f1 | .env | [View secret](https://github.com/samagra-comms/docker-deploy/commit/c67da57c8830547baa362b11c2660056a1fed4f1#diff-e9cbb0224c4a3d23a6019ba557e0cd568c1ad5e1582ff1e335fb7d99b7a1055dR74) |
🛠 Guidelines to remediate hardcoded secrets
1. Understand the implications of revoking this secret by investigating where it is used in your code. 2. Replace and store your secrets safely. [Learn here](https://blog.gitguardian.com/secrets-api-management?utm_source=product&utm_medium=GitHub_checks&utm_campaign=check_run_comment) the best practices. 3. Revoke and [rotate these secrets](https://docs.gitguardian.com/secrets-detection/detectors/generics/generic_high_entropy_secret#revoke-the-secret?utm_source=product&utm_medium=GitHub_checks&utm_campaign=check_run_comment). 4. If possible, [rewrite git history](https://blog.gitguardian.com/rewriting-git-history-cheatsheet?utm_source=product&utm_medium=GitHub_checks&utm_campaign=check_run_comment). Rewriting git history is not a trivial act. You might completely break other contributing developers' workflow and you risk accidentally deleting legitimate data. To avoid such incidents in the future consider - following these [best practices](https://blog.gitguardian.com/secrets-api-management/?utm_source=product&utm_medium=GitHub_checks&utm_campaign=check_run_comment) for managing and storing secrets including API keys and other credentials - install [secret detection on pre-commit](https://docs.gitguardian.com/ggshield-docs/integrations/git-hooks/pre-commit?utm_source=product&utm_medium=GitHub_checks&utm_campaign=check_run_comment) to catch secret before it leaves your machine and ease remediation.

🦉 GitGuardian detects secrets in your source code to help developers and security teams secure the modern development process. You are seeing this because you or someone else with access to this repository has authorized GitGuardian to scan your pull request.

Our GitHub checks need improvements? Share your feedbacks!

RyanWalker277 commented 1 year ago

Instead of making another PR for the kickstart file, I pushed them in this one itself because initially it seemed that the kickstart would take a lot of time to create but it was completed much before anticipated so I pushed it here itself to close this with one PR only.

tushar5526 commented 1 year ago

@RyanWalker277 what was the manual step you mentioned in minio? https://github.com/Samagra-Development/workflow/blob/main/docker-compose.yml#L139 take a look through this and check if you can automate minio as well.

RyanWalker277 commented 1 year ago

There is no way of turning on the Claim User Info option in minio through environment variables. I have asked in the forums, will try to find a workaround for that. As of now, this is needed to be manually turned on in order for Oauth to properly work. I have added the instructions in the readme for now.

tushar5526 commented 1 year ago

Seems fine to me. LGTM @ChakshuGautam let us know if you are aware of any workaround.