Skip to content

Conversation

@edmore
Copy link
Contributor

@edmore edmore commented Oct 21, 2024

Changes Proposed

https://app.clickup.com/t/8689wwmpn

This creates an endpoint /workflows-integration which enables us to create a "workflow integration", which includes the following actions:

  • creating an integration user within the organization
  • creation of an API token and secret
  • POST to /workflows endpoint in integration service to create the workflow

TODO:

  • setup pennsieve.integration_service.host config

Checklist

  • unit tests added and/or verified that tests pass
  • I have considered any possible security implications of this change
  • I have considered deployment issues.

@muftring muftring self-requested a review November 5, 2024 16:08
@muftring
Copy link
Contributor

muftring commented Nov 5, 2024

@edmore - is this an internal-only endpoint?

@muftring
Copy link
Contributor

muftring commented Nov 5, 2024

Remind me, where is this endpoint being invoked? Do we need to check any additional permissions?

The endpoint body is a CreateWorkflowRequest from which only the datasetId is used in creating the ServiceToken. There is no check on the invoker's permission to access the dataset. Is this OK?

The CreateWorkflowRequest has no optional attributes, so this part would seem to overwrite either empty strings or any provided values:

body.copy(
    organizationIntId = secureContainer.organization.id,
    apiToken = tokenSecret._1.token,
    apiSecret = tokenSecret._2.plaintext
),

Copy link
Contributor

@muftring muftring left a comment

Choose a reason for hiding this comment

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

left comments on main discussion part of the PR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants