inovex / CalendarSync

Stateless CLI tool to sync calendars across different calendaring systems.
MIT License
106 stars 13 forks source link

Can this be adapted to support multiple users in one run? #199

Open rooday-doordash opened 3 days ago

rooday-doordash commented 3 days ago

Basically could I create a single GCP project for my org's CalendarSync, and then reuse that client ID and client secret across many sync.yaml files (I'm imagining each user in my org would configure their file and add it to a repo), and then run calendar sync for those files? Would there need to be any change to CalendarSync, or if in it's current state could it do this?

- CalendarSync/
    - calendarsync
    - auth-storage.yaml
    - user1-sync.yaml
    - user2-sync.yaml
    ...

Then have some script that on a schedule does:

userConfigs = all *-sync.yaml files
for userConfig in userConfigs
    CALENDARSYNC_ENCRYPTION_KEY=sharedkey ./calendarsync --config userConfig
rooday-doordash commented 3 days ago

Actually the immediate issue I see with this is that when you run it, it brings you to project consent page, which users won't see if this runs on a service account. Is there any way this could be configured such that if we used a service account credentials that had access to the org's calendars, it could handle syncing for them without needing to show the consent screen?