seven.ioseven.io
All ideas

Fully automated Subaccount creation

Status Quo: Sub Accounts can be created via API Call Verification link has to be clicked manually API Key for the sub account has to be created manually Webhooks can then be created via that API Key Desired State: Skip verification link requirement / auto-verify (for multi-tenant setup only) - own risk, that you don't receive the mails API Key can be created automatically by a) Using the parents accounts API Key, and e.g. X-Account-Id Header b) by adding parameters to the subaccount-creation API call (API key name, Expiration, Rights, ...) and returning the sub-accounts API key with the response That way the subaccount creation could be fully automated :-) Thanks guys, have a wonderful day! Best wishes Max

Activity · 5
christian
christian6mo
Hi Max, thanks for your suggestions. Regarding the verification link: Subaccounts are already fully usable right after creation - the verification mail only blocks email/password login (not API usage). For your tenants you could simply use plus-addressing on a single mailbox you control (e.g. acme+sub1@yourdomain.com, acme+sub2@yourdomain.com) and ignore the welcome mails. A real catch-all domain works too as long as it's one you actually receive on. Regarding API keys: We're planning a "multi-tenant" flag on API keys - one key on your main account, sent with an X-Account-Id: header, would then act on behalf of the targeted subaccount (scoped to subs you own). Would that cover your use case? If yes, no per-sub key management needed on your side at all. BR Christian
Maximilian Tietz
Maximilian Tietz6mo
Hi Christian, yes, we have a catchall mailbox for them anyway :) seven-io-{tenant_id}@. So - it's a catchall with Regex :) The Multi-Tenant-API Key is technically a solution that would work, but it's still a "higher risk" than using one key per subaccount. If that key gets leaked, you'd have access to every single sub-account, but on the other hand, if you'd allow creating API keys for subaccounts, the risk is technically the same. The only solution that might mitigate it partly would be to add the parameter to create the API key automatically on subaccount creation (then the key is "leaked" / shown once, on subaccount creation). If that one API key is leaked somehow, only that one subaccount is compromised, not all subaccounts. Best wishes Max
Maximilian Tietz
Maximilian Tietz6mo
Hm, I sent a reply, but it seems to have been lost? Maybe also stuck in moderation :) Let's see
christian
christian6mo
Hey Max, the solution to this should be: Don't leak you API key :-) Offtopic, but you could additionally harden your account: Enforce request signing: https://docs.seven.io/en/rest-api/signing Whitelist IP addresses for the API: https://help.seven.io/en/developer/whitelist-for-accessing-the-api Dashboard login IP whitelist: https://help.seven.io/en/account/ip-whitelist-for-login Set geo restrictions: https://help.seven.io/en/sms/geographic-restrictions BR Christian
christianmarked this as In Progress· 6mo
christianmarked this as Completed· 6mo
christianmarked this as In Progress· 6mo
christian
christian6mo
This has been completed now: http://localhost:3001/en/rest-api/authentication#subaccount-access
christianmarked this as Completed· 6mo

More in Feature