Skip to content
This repository has been archived by the owner on Jun 25, 2024. It is now read-only.

feat(INT-6599): create document permissions script #568

Merged
merged 1 commit into from
Jan 30, 2023

Conversation

gastonyelmini
Copy link
Contributor

Create Document permissions script

Context and motivation:

We must provide the required list of permissions that require a review of all the SDK calls that we are doing and collect all of them. As part of making this process more scalable, this spike ticket was created, in order to investigate a way to automate the process of collecting this permissions and adding this to jupiterone.md README automatically. This script might be migrated to the SDK in the future to apply this process to all services.

How it works

yarn document:permissions command was added. This script imports invocationConfig variable from steps index to be able to collect permissions. This permissions will be added to the IntegrationStep array in each step as permissions. This would look like this:

{
    id: ...,
    name: ...,
    dependsOn: [],
    entities: [],
    relationships: [],
    executionHandler: () => {},
    permissions: ['permission1', 'permission2'],
},

And will produce a new section in jupiterone.md documentation:

Screen Shot 2023-01-09 at 11 01 20

@gastonyelmini gastonyelmini requested a review from a team as a code owner January 9, 2023 14:39
ndowmon
ndowmon previously approved these changes Jan 12, 2023
@gastonyelmini gastonyelmini force-pushed the INT-6599-document-permissions branch from e9d3858 to 3e216e2 Compare January 16, 2023 20:31
@zemberdotnet
Copy link
Contributor

@ndowmon and @gastonyelmini This is seriously awesome. Is this something either of you think would be good to port upstream in time to the SDK? Documenting permissions is a tough task given the size of lots of integrations and I think this may help in other places as well. Thoughts?

@gastonyelmini
Copy link
Contributor Author

@ndowmon and @gastonyelmini This is seriously awesome. Is this something either of you think would be good to port upstream in time to the SDK? Documenting permissions is a tough task given the size of lots of integrations and I think this may help in other places as well. Thoughts?

Hey @zemberdotnet, thank you for taking a look! I agree that this could be applied to the SDK to be used by other services, actually that is one of the considerations of this spike. I'm open to discuss at any time!

BTW, this is a chained pr: #570, that has some script improvements, a pre-commit hook, the actual permissions review, and the list of permissions added to the documentation.

@gastonyelmini gastonyelmini merged commit df16ea1 into main Jan 30, 2023
@gastonyelmini gastonyelmini deleted the INT-6599-document-permissions branch January 30, 2023 15:36
@j1-internal-automation
Copy link
Collaborator

🚀 PR was released in v2.21.0 🚀

@j1-internal-automation j1-internal-automation added the released This issue/pull request has been released. label Mar 31, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
released This issue/pull request has been released.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants