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

Only provider should be able to update the connector url #1085

Open
dhiren-singh-007 opened this issue Oct 21, 2024 · 3 comments · May be fixed by #1086
Open

Only provider should be able to update the connector url #1085

dhiren-singh-007 opened this issue Oct 21, 2024 · 3 comments · May be fixed by #1086
Assignees
Labels
bug Something isn't working
Milestone

Comments

@dhiren-singh-007
Copy link
Contributor

Current Behavior

Currently in portal backend there is a validation that only host can update the connector url which restricts the provider to update the connector url.

Expected Behavior

Actually provider is the one who provides the connector so only provider should be able to update the connector url.

Steps To Reproduce

Provider : ABC
Host : XYZ

  1. Create a managed connector for company "XYZ"
  2. Update the connector url which is created for "Host Company" , it will throw and error "Company ABC is not the connectors host company"
  3. Now login form XYZ company and update the managed connector, now it will allow the update.
@dhiren-singh-007 dhiren-singh-007 added the bug Something isn't working label Oct 21, 2024
@github-project-automation github-project-automation bot moved this to NEW USER REQUEST in Portal Oct 21, 2024
@dhiren-singh-007 dhiren-singh-007 self-assigned this Oct 21, 2024
@dhiren-singh-007 dhiren-singh-007 linked a pull request Oct 21, 2024 that will close this issue
5 tasks
@MaximilianHauer MaximilianHauer moved this from NEW USER REQUEST to IN PROGRESS in Portal Oct 22, 2024
@MaximilianHauer MaximilianHauer added this to the Release 24.12 milestone Oct 22, 2024
@ntruchsess
Copy link
Contributor

@dhiren-singh-007 @MaximilianHauer : I think the behavior should depend on the ConnectorType:

  • if it's ConnectorTypeId.CONNECTOR_AS_A_SERVICE the provider should be able to update
  • if it's ConnectorTypeId.COMPANY_CONNECTOR the host should be able to update

@dhiren-singh-007
Copy link
Contributor Author

dhiren-singh-007 commented Nov 14, 2024

@ntruchsess : I think if COMPANY_CONNECTOR type can have a different provider and host then i think it make sense to allow host to update the connector.
But if COMPANY_CONNECTOR will always have provider and host as same id then i think provider validation should be enough.
I am not sure from business perspective whether this will be a case that COMPANY_CONNECTOR will have a different provider and different host.
cc @MaximilianHauer

@ntruchsess
Copy link
Contributor

ntruchsess commented Nov 14, 2024

@dhiren-singh-007 : you are right - ConnectorTypeId.COMPANY_CONNECTOR typed connectors are being created with host and provider being set to the same id:

var connectorRequestModel = new ConnectorRequestModel(name, connectorUrl, ConnectorTypeId.COMPANY_CONNECTOR, location, companyId, companyId, technicalUserId);
It's therefore sufficient (and also safe) to just check the providerid.

cc @MaximilianHauer

@ntruchsess ntruchsess linked a pull request Nov 14, 2024 that will close this issue
5 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: IN PROGRESS
Development

Successfully merging a pull request may close this issue.

4 participants