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

(Feat): V2 slugified project routes #1449

Merged
merged 130 commits into from
Mar 17, 2024
Merged

(Feat): V2 slugified project routes #1449

merged 130 commits into from
Mar 17, 2024

Conversation

DanielHougaard
Copy link
Collaborator

@DanielHougaard DanielHougaard commented Feb 23, 2024

Description 📣

This PR introduces new routes on the V2 api (/api/v2/workspace), that use project slugs instead of project ID's. This is a prerequisite for adding project support to our Terraform provider.

I've introduced a new project DAL operation called getProjectByFilter, which will make it easier to query for projects based on both slugs and ID's.

Additionally, this PR also fixes the v1 update project endpoint. The endpoint is currently only accessible with the JWT auth method. It's now also accessible by MI's.

Type ✨

  • Bug fix
  • New feature
  • Breaking change
  • Documentation

@DanielHougaard DanielHougaard self-assigned this Feb 23, 2024
@DanielHougaard DanielHougaard marked this pull request as ready for review February 23, 2024 03:47
Copy link
Collaborator

@maidul98 maidul98 left a comment

Choose a reason for hiding this comment

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

Just some small comments

backend/src/server/routes/v2/project-router.ts Outdated Show resolved Hide resolved
frontend/src/config/request.ts Show resolved Hide resolved
backend/src/server/plugins/auth/inject-identity.ts Outdated Show resolved Hide resolved
@DanielHougaard
Copy link
Collaborator Author

NOTE: The breaking change check will fail, because we've changed the create project router to take an organization slug instead of an organization ID. This is a public API endpoint documented on our API reference page. I've spoken to @maidul98 about this back when the change was made, and we decided to move forward with changing the endpoint.

Copy link

gitguardian bot commented Mar 12, 2024

️✅ There are no secrets present in this pull request anymore.

If these secrets were true positive and are still valid, we highly recommend you to revoke them.
Once a secret has been leaked into a git repository, you should consider it compromised, even if it was deleted immediately.
Find here more information about risks.


🦉 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!

@DanielHougaard DanielHougaard force-pushed the daniel/slug-projects branch 3 times, most recently from 0aa0bb4 to 29cc94f Compare March 13, 2024 08:17
@DanielHougaard DanielHougaard mentioned this pull request Mar 15, 2024
5 tasks
maidul98
maidul98 previously approved these changes Mar 15, 2024
maidul98
maidul98 previously approved these changes Mar 17, 2024
DanielHougaard and others added 25 commits March 17, 2024 18:49
author Daniel Hougaard <[email protected]> 1709970985 +0100
committer Daniel Hougaard <[email protected]> 1710345579 +0100

parent 10a292b
author Daniel Hougaard <[email protected]> 1709970985 +0100
committer Daniel Hougaard <[email protected]> 1710345572 +0100

parent 10a292b
author Daniel Hougaard <[email protected]> 1709970985 +0100
committer Daniel Hougaard <[email protected]> 1710345563 +0100

parent 10a292b
author Daniel Hougaard <[email protected]> 1709970985 +0100
committer Daniel Hougaard <[email protected]> 1710345551 +0100

parent 10a292b
author Daniel Hougaard <[email protected]> 1709970985 +0100
committer Daniel Hougaard <[email protected]> 1710345540 +0100

parent 10a292b
author Daniel Hougaard <[email protected]> 1709970985 +0100
committer Daniel Hougaard <[email protected]> 1710345533 +0100

parent 10a292b
author Daniel Hougaard <[email protected]> 1709970985 +0100
committer Daniel Hougaard <[email protected]> 1710345529 +0100

parent 10a292b
author Daniel Hougaard <[email protected]> 1709970985 +0100
committer Daniel Hougaard <[email protected]> 1710345522 +0100

parent 10a292b
author Daniel Hougaard <[email protected]> 1709970985 +0100
committer Daniel Hougaard <[email protected]> 1710345503 +0100

parent 10a292b
author Daniel Hougaard <[email protected]> 1709970985 +0100
committer Daniel Hougaard <[email protected]> 1710345496 +0100

parent 10a292b
author Daniel Hougaard <[email protected]> 1709970985 +0100
committer Daniel Hougaard <[email protected]> 1710345489 +0100

parent 10a292b
author Daniel Hougaard <[email protected]> 1709970985 +0100
committer Daniel Hougaard <[email protected]> 1710345357 +0100

parent 10a292b
author Daniel Hougaard <[email protected]> 1709970985 +0100
committer Daniel Hougaard <[email protected]> 1710345061 +0100

parent 10a292b
author Daniel Hougaard <[email protected]> 1709970985 +0100
committer Daniel Hougaard <[email protected]> 1710345029 +0100

Feat: Org Scoped JWT Tokens

Add link button

Fix: Avoid invalidating all queries on logout to prevent UI glitch

Update _app.tsx

Feat: Scoped JWT to organization, add authMethod to request

Feat: Scoped JWT to organization, Add authMethod to services

Feat: Scoped JWT to organization, require organization on all requests by default on JWT requests

Update index.ts

Feat: Scoped JWT to organization

Chore: Move SAML org check to permission service

Feat: Scoped JWT to organization, actorAuthMethod to create project DTO

Fix: Invalidate after selecting organization

Chore: Optional 'invalidate' option for create org hook

Fix: Creating dummy workspaces

Fix: Select org after creation

Feat: Org Scoped JWT's, remove inline service

Fix: ActorType unresolved

Fix: Better type checking

Feat: Org scoped JWT's

Fix: Add missing actor org ID

Fix: Add missing actor org ID

Fix: Return access token

Update auth-type.ts

Fix: Add actor org ID

Chore: Remove unused code

Fix: Add missing actor org ID to permission check

Fix: Add missing actor auth method to permission checks

Fix: Include actor org id

Chore: Remove redundant lint comment

Fix: Add missing actorOrgId to service handlers

Fix: Rebase fixes

Fix: Rebase LDAP fixes

Chore: Export Cli login interface

Update queries.tsx

Feat: Org scoped JWT's CLI support

Update inject-permission.ts

Fix: MFA

Remove log

Fix: Admin signup, select organization

Improvement: Use select organization hook

Update permission-service.ts

Fix: Make API keys compatible with old endpoints

Update inject-permission.ts

Chore: Better error messages

Update index.ts

Fix: Signup not redirecting to backup PDF page due to error

Select org on signup

Type improvements

Chore: Removed code that spans out of scope

Fix: Better types

Chore: Move comment

Chore: Change order

Fix: Code readability

Fix: Code readability

Update auth-token-service.ts

Chore: Remove old comments

Fix: Cleanup

Chore: Minor code cleanup

Fix: Add auth method and organization ID to test JWT

Fix: Get org ID in getOrgIdentityPermission DAL operation
@maidul98 maidul98 merged commit 1e65796 into main Mar 17, 2024
5 of 6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants