Skip to main content

API keys

An API key lets a CI job or script use FossID without anyone signing in. The job gives FossID the key and gets a short-lived sign-in in return. Revoking the key stops the job at its next run.

People make and manage keys on the FossID Account site, https://auth.fossid.app. This page covers what you set up first, how people make a key, and how you keep control of keys.

Before people can make keys​

  1. Ask FossID to turn on API keys. FossID gives the API keys permission to your whole organization, or to named people only. Until then, API keys doesn't appear in the site's menu. A person who opens https://auth.fossid.app/keys anyway sees You do not have access to API keys.
  2. Choose your account admins. Ask FossID to give the Account admin permission to the people who should see and revoke every key in your organization. An account admin can't make keys unless they also have API keys.
  3. Okta only: add the site to your Okta application. People sign in to the site through your Okta, so Okta must accept the site's address. Add it to the application you already made for FossID. You don't need a second application, and you send FossID nothing new. See steps 3 and 4 of Okta setup.

Microsoft Entra ID needs nothing from you. FossID registers the site in its own application.

Make a key​

You need the API keys permission.

  1. Open https://auth.fossid.app/keys.
  2. Enter your work email and select Continue. FossID sends you to your organization's sign-in. If your organization has more than one sign-in, the page asks you to choose one, for example Continue with Okta.
  3. Sign in as usual. The API keys page opens.
  4. Select New key, then fill in the form:
    • Name (optional): what uses the key, for example nightly scan.
    • Expires after: 30 days, 90 days, 180 days, or 1 year. The default is 90 days.
    • What the key can do: choose Everything, or choose Only these and tick the permissions the key needs.
  5. Select Create key.
  6. The page shows the key under Copy the key now. Select Copy, and store the key in your CI system's secret store.
  7. Select I have stored it.

Important: FossID shows the key once and can't show it again. If you lose it, revoke it and make a new one.

With Everything, the key follows your organization, including permissions added later. With Only these, the key keeps exactly the permissions you tick. A key with fewer permissions does less harm if it leaks, so choose Only these when you can.

A key never carries a permission that FossID gave to one person only. It has only the permissions that your whole organization has.

Making a key needs a sign-in from the last 10 minutes. If yours is older, Create key sends you to sign in again, then brings you back to the form with what you typed still in it. A note at the top says that you signed in again. Check the details and select Create key.

Use a key​

The FossID Toolbox, from version 1.7.26, can sign in with a key. Set the key in the environment of the CI job as FOSSID_API_KEY. Keep it in your CI system's secret store, and never commit it to a repository.

The Toolbox reads the key only from the environment. It has no flag for the key, so the key doesn't appear in the command line. The Toolbox doesn't write the key to a log line or an error message. If FOSSID_API_KEY is set, the Toolbox uses it and ignores --token and FOSSID_TOKEN.

Each run exchanges the key for a sign-in that lasts 15 minutes, and the Toolbox renews that sign-in on its own. The job needs outbound HTTPS access to https://auth.fossid.app, as well as to your FossID server.

A scan for vulnerable snippets (VSF) needs a key with the Vulnerability Snippet Finder permission, or with Everything. Other scans need no particular permission.

See and revoke keys​

The API keys page lists keys in two tabs, Active and Stopped or expired. Each row shows the key's name and key ID, what it can do, when it was last used, when it expires, and its status.

  • A person with the API keys permission sees the keys they made. A note under the list says so.
  • An account admin sees every key in your organization, and each row also shows who made the key. An account admin without the API keys permission can revoke keys but can't make them.

Last used shows days: Today, Yesterday, 12 days ago, or Never. FossID records the last use of a key once a day, so the page can't show hours.

To revoke a key, select Revoke next to it, then select Revoke key to confirm. Any job that uses the key stops at its next run. Sign-ins that the key already made keep working for up to 15 minutes. A revoked key disappears from the list.

A key shows one of four statuses:

  • Active.
  • Expiring soon: the key has fewer than 30 days left.
  • Expired.
  • Stopped (unused): nobody used the key for 90 days.

An expired or stopped key no longer works. Make a new key to replace it. A stopped key keeps its real expiry date in the Expires column.

When a key expires within 30 days, the Overview page shows a warning with a View key button, so you can make a replacement before the jobs that use the key fail.

See who has extra permissions​

Account admins also have a Users page. Everyone in your organization has the permissions that FossID gave to your organization. The Users page lists the people who have more, with their extra permissions and the sign-in they use, or Not yet if they haven't signed in. The page is read-only. To change who has what, ask your FossID contact.

Limits​

  • A key that nobody uses for 90 days stops working. Make a new key to replace it.
  • An organization can have at most 50 active keys. Stopped and expired keys don't count.
  • A key never has more permissions than your organization has. If FossID removes a permission from your organization, keys lose it at their next run.

When someone leaves​

Your Okta or Microsoft Entra ID rules don't reach API keys. A key keeps working after the person who made it leaves, until it expires or you revoke it. Taking the API keys permission away from a person doesn't stop their keys either.

When someone leaves, an account admin should revoke that person's keys:

  1. Open the API keys page. It lists every key in your organization.
  2. Find the person's email address in the Made by line of each row. The page cuts a long address with an ellipsis. Point at it to see the whole address.
  3. Select Revoke next to each of their keys.

If something goes wrong​

What you seeWhat to do
You do not have access to API keysYour account doesn't have the permission. Ask your FossID contact to turn it on.
Making a key needs the API keys permission. Ask your FossID contact to give it to you.You are an account admin without the API keys permission. You can see and revoke keys, but you can't make them. Ask your FossID contact to give you the permission.
Your organization signs in with Google, and this site does not support that yet.FossID can't let people sign in to this site with Google yet. Ask your FossID contact about other ways to sign in.
We could not find a sign-in for <domain>.FossID has no sign-in for that email domain. Check the address. If it is right, ask your FossID contact to set up sign-in for your organization.
An Okta error page says the redirect_uri parameter must be a Login redirect URIYour Okta application doesn't have https://auth.fossid.app/callback as a sign-in redirect URI. Add it under Sign-in redirect URIs, not under Sign-out redirect URIs. See step 3 of Okta setup.
Okta said: followed by a message, and under it "Ask your IT administrator to add https://auth.fossid.app/callback as a sign-in redirect URI in Okta."Your Okta application doesn't accept https://auth.fossid.app/callback. See step 3 of Okta setup.
Okta said: followed by a message, and under it "Tell your IT administrator. They can check that you are assigned to the FossID application."Okta refused the sign-in. Assign the person to the FossID application, or check the access policy of a custom authorization server. See steps 6 and 7 of Okta setup.
Microsoft said: followed by a message, and under it "This is a FossID setup problem. Tell your FossID contact."The site's address isn't registered in FossID's Microsoft Entra ID application. Tell your FossID contact.
We could not finish signing in with your organization's sign-in.Check your network connection. If you use Okta, it needs https://auth.fossid.app as a Trusted Origin with CORS enabled. See step 4 of Okta setup.
FossID did not accept this sign-in.Your sign-in may have expired, or your account may not have access. Sign in again. If the message comes back, ask your FossID contact to check that your organization is set up and that you have access.
Your session ends in 6 minutes, at the top of the pageYour sign-in is about to end. Select Sign in again to start a new one. When it ends, the site says Your session ended. Sign in again.
Your organization already has 50 active API keys.Revoke a key that you no longer need, then make the new one. Stopped and expired keys don't count.
Something went wrong on our side.Try again in a moment. If it keeps happening, tell your FossID contact and give them the reference shown under the message, for example 7f3a-91c2.
We could not reach FossID.Check your network connection, then try again.