Urgent.News

What's breaking now, across thousands of outlets.

Tech

Moving a project to another org can leave the old org's API keys working

A lot of SaaS products let you move a project from one organization to another, often after an acquisition or when a team splits off. The move updates project.org_id and copies the members over. The API keys and deploy tokens created inside the project stay attached to project_id , and the auth middleware only checks that the key belongs to that project. So the agency that built a project for a…

When transferring a project from one organization to another in SaaS products, there is a risk that the old organization's API keys and deploy tokens remain functional. This occurs because the API keys are tied to the project's ID rather than the organization's ID. The authentication middleware only verifies if the key belongs to the project, not the organization. Consequently, even after the transfer, the credentials built during the project's initial setup continue to function within the old organization.

For instance, if an agency constructs a project for a client and subsequently hands it over to the client, the agency's CI token remains active, attempting to push to the project even a month later. This token was issued under the agency's original organization, not the new one. Moreover, the transferred credential does not appear in the new organization's list of keys, as it was generated under the old organization.

To address this issue, organizations need to treat the transfer as a permission change for all credentials associated with the project. One approach is to revoke project-scoped keys during the transfer process. Alternatively, a unique identifier such as issued_by_org_id can be stored on each key. When the key fails to match the project's current organization, it should be rejected.

Following the transfer, the new organization's administrators should be notified of any keys that survived the transfer, along with the original creators of each key, enabling them to decide which ones to keep. To verify this process, one can create a project key in organization A, transfer the project to organization B, and attempt to use the old key with the API.

If the call is successful, it indicates that the old organization still retains access to the project.

Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.

Read the original at dev.to →

More in Tech

Dark Reader vs NightOwl: Choosing a Firefox Dark Mode Extension

Dark Reader vs NightOwl: Choosing a Firefox Dark Mode Extension Dark Reader is the default recommendation for browser-wide dark mode. NightOwl is a simpler alternative.

  • Dark Reader has been around since 2014 and boasts over 5 million users
  • It offers sophisticated rendering, fine-grained per-site configuration, and active development
  • NightOwl takes a simpler approach by applying a CSS filter: invert() to the entire page

Idempotency keys: stop charging customers twice when they double-click Pay

A customer taps Pay . The spinner hangs for four seconds, so they tap it again. Or their phone drops from Wi-Fi to mobile data halfway through the request, and the app retries.

  • Idempotent requests prevent double charges when customers double-click Pay
  • Idempotency keys use unique UUIDs generated by the client
  • Server stores responses for each key to return on repeated requests

Firefox Dark Mode: Every Option Explained (and Which Actually Works)

Firefox Dark Mode: Every Option Explained (and Which Actually Works) Firefox has at least four different mechanisms for dark mode, and they work differently.

  • OS dark mode works for websites supporting CSS prefers-color-scheme, but not for others.
  • NightOwl extension provides universal dark mode for non-compliant sites, with per-domain controls.

More from Friday 16 October →