Skip to content

feat: app sharing (now open source!) - #4378

Merged
deansheather merged 16 commits into
mainfrom
dean/app-sharing
Oct 14, 2022
Merged

deansheather merged 16 commits into
mainfrom
dean/app-sharing

Conversation

@deansheather

@deansheather deansheather commented Oct 5, 2022 •

Copy link
Copy Markdown
Collaborator

Closes #3515, Closes #4358

Adds app sharing. Templates can add share = "owner" (defaults to owner) to apps to enable sharing. Available levels:

  • owner (default) which means only the owner can access it, basically means "unshared"
  • authenticated means any user that is signed in
  • public means any user, including unauthenticated users (also bypasses scope checks on API keys intentionally)

TODO:

  • Add sharing_level to provider code
  • Big tests
  • Test for scope
  • Add share to the provider itself
  • Add to example templates for discovery
  • Add method for creating a new API key with a given scope (which I needed for writing tests)
  • Add flag to control available levels for enterprise customers only (future PR)

@deansheather deansheather changed the title feat: app sharing (enterprise) feat: app sharing (now open source!) Oct 12, 2022
@deansheather
deansheather marked this pull request as ready for review October 12, 2022 20:03
@deansheather
deansheather requested a review from a team as a code owner October 12, 2022 20:03
@deansheather
deansheather requested review from a team, Emyrk, f0ssel, presleyp and sreya and removed request for a team October 12, 2022 20:03

@presleyp presleyp left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Frontend ✅ looks cool!

@sreya sreya left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

The code seems pretty good overall. My one comment on the structure is there seems to be a lot of the "guts" of workspace apps spilling out into coderd. Do you think any of this makes sense to break out into an apps package and concentrate a lot of the logic here?

Comment thread coderd/workspaceapps.go Resolved
Comment thread coderd/workspaceapps.go Resolved
@deansheather

Copy link
Copy Markdown
Collaborator Author

@sreya at the moment all of the applications code is in a single file so it's not spread out across coderd or anything like that. We will have to move this to a separate package to support satellites soon (Colin and I have plans), so since we already plan on moving it to it's own package and making a lot of changes I think we should leave it here for now to avoid having to do the same work twice (as we'll need to make a lot of other changes at the same time to support satellites).

@sreya

sreya commented Oct 12, 2022 •

Copy link
Copy Markdown
Collaborator

@deansheather if you wish to do it in another PR i'm cool with that. Personally I think it's a little premature to start considering satellites but we can have that discussion elsewhere ❤️

@deansheather

deansheather commented Oct 12, 2022 •

Copy link
Copy Markdown
Collaborator Author

(our plans are to refactor all of the connection code so it doesn't depend directly on the database in upcoming weeks and move it all to a different package)

Comment thread coderd/workspaceapps.go Resolved
Comment thread coderd/workspaceapps.go Resolved
Comment thread coderd/workspaceapps.go Resolved
Comment thread coderd/workspaceapps.go Resolved
@deansheather
deansheather merged commit d898737 into main Oct 14, 2022
@deansheather
deansheather deleted the dean/app-sharing branch October 14, 2022 16:46
@github-actions github-actions Bot locked and limited conversation to collaborators Oct 14, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Opening the link generated by the port forward button requires authentication Share apps or ports with other users and even the public!

6 participants