Safeguard
Developer Tools•

App Store Connect API key or Apple ID password for CI?

Use an App Store Connect API key for CI where the tool supports it: no 2FA workarounds and role scoping. How team and individual keys differ.

Safeguard Security Team
4 min read

Prefer an App Store Connect API key wherever your tools support it. It is a revocable, role-scoped credential made for automation, while an Apple ID password drags in two-factor workarounds and a person's full access. Use a team key with the narrowest role that still lets the lane do its job.

The two ways CI can authenticate

The fastlane documentation describes the history. Its tools have long used an Apple ID with username and password and a cookie-based web session. The docs say to use API key authentication when you are able to, and list the benefits: no 2FA needed, better performance, a documented API and increased reliability.

An API key is a .p8 private key file plus a key ID and an issuer ID, which together are used to create a JSON Web Token for authorization. The fastlane example sets a token duration, and the documented maximum is 1,200 seconds, so the token is short-lived even though the key is not.

Compare the options

QuestionApple ID and passwordAPI key
Two-factor handlingNeeds pre-generated sessions or app-specific passwordsNot needed
Tied to a personYesTeam key: no. Individual key: yes
ScopeEverything that user can doThe role you pick
RevokingChange the password and sessionsRevoke the key
Tool supportBroadestMost tools, but not all

On that last row, the fastlane table of supported tools shows API key support for most actions, but not for every one. For example, it lists produce as partial and pem as not supported. Check your lanes before switching.

Team key or individual key

The documentation recommends a Team key and states it is required for any provisioning-related API access. The two types differ:

  • Team keys have access to all apps, with levels set by the selected role.
  • Individual keys take the access and roles of the associated user, and cannot use provisioning endpoints, sales and finance data, or the notary tool.

An individual key tied to a person is also a bus factor problem: when that person leaves, the pipeline can break.

Setup steps that protect you

  1. Create the key from the Users and Access area under the Integrations tab. If you do not see the tab, you lack permission and an account holder must grant it.
  2. Choose a role for the task at hand, not a default of the highest one.
  3. Download the .p8 immediately. The docs say it cannot be downloaded again after the page is refreshed.
  4. Put the file contents, key ID and issuer ID into your secret manager as separate entries.
  5. Load them on the job only for lanes that talk to the store.
  6. Rotate on a schedule and whenever someone with access leaves.

What not to do

If you must keep an Apple ID for a legacy tool, give it its own shared account and not a person's login, use app-specific passwords where the docs say they are needed, and never commit the password into the repo or Fastfile. The fastlane CI page lists the variables for these cases, and our post on fastlane variables to treat as secrets covers them.

Where Safeguard fits

Safeguard does not issue or store store credentials. It inventories the open source your app ships with SBOM and dependency scanning, and its policies can gate a release. Try the free scan.

Quick check

Can I get production release rights from a team key?

That depends on the role you select when creating it. Pick the least permissive role that works.

Is the API key safer just because it avoids 2FA?

Not by itself. It is safer when you also scope the role, keep the file in a secret manager and rotate it.

Sources

Last reviewed: 19 October 2026.

Never miss an update

Weekly insights on software supply chain security, delivered to your inbox.

Self-healing security runs on Safeguard.

Your first fix PR is minutes away.

No sales call required, even your agent can complete the purchase over MCP.