-
Notifications
You must be signed in to change notification settings - Fork 0
Migration to firebase Authentication #72
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
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Removed previous implementation of custom JWT Authentication All existing controllers such as softwareController and usersController are reimplemented with firebase Authentication implementation Added disabledAPIEndPoint middleware to allow for disabling of API endpoints Disabled /api/auth API endpoint (Possible removing of auth api endpoint in future commits) with the new disabledAPIEndPoint middleware Disabled auth.test.js test suite and moved to disabledAPINotTested directory (with jest.config.js configuration) Refactored API endpoint from /api/softwareds/ to /api/software/ for consistency Amended software model to change platforms field from array to string (Plan for project page in future to support software with multiple platforms) Amended user model's passwordHash field to password field for consistency (It should still store password hash) Refactored all existing requests rest API test cases with the new software API endpoints route amendments, changes to request body and Authorization header Reimplemented all test cases for software.test.js and users.test.js (including their test utilities) with firebase Authentication integration Note: Some test cases are removed from previous test suites as it is handled by firebase Authentication such as email validation. Added firebaseConfig.js firebaseTestUtils.js Removed unused environmental variables from config.js
Improved app-test-container.yml GitHub Actions to support firebase Authentication Added new environmental variables introduced in migration to firebase Authentication in Dockerfile and remove unused environmental variables Improved .gitignore to avoid committing Google service account file for security purposes Added test-ci script in package.json for continuous integration usage Improved comments in software.test.js Added firebase.gpg Added Shell script descrypt_firebase_secret.sh for firebase.gpg decrpytion (This is for continuous integration only) Added Dockerfile-ci which is a separate dockerfile used only by continuous integration Improved docker-compose-test-ci with firebase Authentication support Refactor docker ci files to .github directory
…softwaredevelopment/SoftwareRepository into migration-to-firebase-auth
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
API
Related to API endpoints
bug.resolved
Related to resolution of bugs
code quality
Related to code quality
db.model
Related to database models/schemas
docker
Related to docker
documentation
Improvements or additions to documentation
enhancement
New feature or request
firebase
Related to firebase
github_actions
Pull requests that update Github_actions code
priority.high
High priority
Security
Related to Security
status.done
Done and ready for review and merge
Testing
Related to testing
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
To address #68
Reimplemented existing source code for firebase Authentication migration
softwareController
andusersController
are reimplemented with firebase Authentication implementationdisabledAPIEndPoint
middleware to allow for disabling of API endpoints/api/auth
API endpoint (Possible removing ofauth
api endpoint in future commits) with the new disabledAPIEndPoint middlewareauth.test.js
test suite and moved todisabledAPINotTested
directory (with jest.config.js configuration)/api/softwares/
to/api/software/
for consistencysoftware
model to changeplatforms
field toplatform
field and the corresponding type fromarray
tostring
(Plan for project page in future to support software with multiple platforms)passwordHash
field topassword
field for consistency (It should still store password hash)Authorization
headersoftware.test.js
andusers.test.js
(including their test utilities) with firebase Authentication integration.Note: Some test cases are removed from previous test suites as it is handled by firebase Authentication such as email validation.
firebaseConfig.js
andfirebaseTestUtils.js
config.js
.gitignore
to avoid committing Google service account file (Security purposes)The Improved docker support with firebase Authentication
docker-compose-test-ci.yml
to.github/ci/docker-compose-test-ci.yml
decrypt_firebase_secret.sh
shell script used for continuous integrationdockerfile
and removed unused environmental variablesdockerfile-ci
a custom docker file specifically for continuous integrationOthers
put
software
API endpoint is doing a partial update of resource in logic which in the concept of Rest API is a behaviour ofpatch
hence, the HTTP method is changed fromput
topatch
to match the logic used