This is a part of the epic to make the GitLab for Jira app available for self-managed (&5650 (closed))
The summary of the whole feature is that GitLab.com will act as a proxy for the self-managed instance. This means we will need a JiraConnectInstallation record on .com and self-managed.
The installation record gets created with a webhook that we usually receive from Jira. With the proxy in place, the hook has to come from GitLab.
The hook contains:
A shared secret that needs to be stored and will be used to authorize future requests.
A public key is needed to decode the JWT in the installed hook. The key can be fetched from connect-install-keys.atlassian.com/{{KEY_ID}} and KEY_ID is included in the JWT's kid header.
We don't store the JWT token that was included in the installed hook to GitLab.com. So we have to construct a new token, but this won't match a public key at Atlassian.
Solution:
We can offer an endpoint to fetch public keys from on GitLab.com
The security measure in asymmetric JWT is that the domain to fetch the public key is fixed. It points to connect-install-keys.atlassian.com. We can make this an application setting, so users can point it to gitlab.com/-/jira_connect/public_keys instead. This would require:
I was working to make sure slipped issues moved to %15.5 for those we knew would not make the cut in %15.4.
I realize for this one however, it was a new issue we discovered during the milestone. While we didn't already have it planned, it blocked the deliverable. So... I'm not 100% sure how best to treat this one but going with missed-deliverable for now. If we have a better way to treat it, I'm open to ideas.
@g.hickman Using missed-deliverable could help us a lot when reviewing the backlog to see things we should focus on as they were previously scheduled as a priority. We can keep that label here to raise the attention to this issue.
Yes, 1 sounds good @arturoherrero. It is in security review now, but the setup to try the feature locally is so complex that want to come up with a simpler solution before proceeding with the review.
The Application Security review is now unblocked. I managed to get the setup down to 15 steps. It's not as close to production as the full setup, but it should do the job.
@Andysoiron I'm checking !101702 (merged), what do you think about having the maintainer review but with a note to wait for the final security review? I'm trying to speed up things.
Yes, good idea. I just asked @.luke to do the maintainer review. The MR is quite large, and it can be helpful to have a bit of context, so I decided to keep the review within the team.
We run into a problem with testing the feature. I asked @dcouture to work around this using localhost as GDK host and asked @justin_ho to look into the problem in the meantime.
That's correct @arturoherrero. The MR is merged, and I was able to successfully test this on staging. However, I found that the jira_connect_oauth_self_managed feature needed to be enabled on the self-managed instance, which shouldn't be the case. This is because of the feature check here. It should be easy to remove though.
@Andysoiron, can you update the milestone of the issues, title if necessary (eg. from enabling to removing the feature flag), create new issues if necessary (eg. remove the feature flag after enabling it), and clarify the dependencies to release the feature, please?
Regarding the feature flags, we should not default_enable or remove them right now:
#359940 (closed) can be enabled on GitLab.com as soon as %15.7 is released and people are able to update their self-managed instances. Only GitLab %15.7 can be linked to the GitLab.com proxy. We can remove the FF with %15.8.
#355048 (closed) has to stay disabled by default because it breaks the app for self-managed users that didn't set up an OAuth application, but the feature has to be enabled on GitLab.com. I'm not sure how to proceed with this. Maybe we have to wait until %16.0 to remove it and introduce a breaking change. See #355048 (comment 1138032752)
Sorry @Andysoiron, this is still unclear to me as we have "enable" as the title, but we also discuss removing feature flags. Can you update the issues or create new ones with clear milestones about what to do? If we need to enable a feature flag and then remove it, that should be 2 issues to clarify what we have to do and when. Please update the relationship and blockers between them.
This is because the milestone ends on December 17, but the release date is on December 22. We can enable the feature on GitLab.com on the 22nd but technically this is in %15.8 even though we release it with 15.7. Hope this makes sense