aicoded.dev

App types: what needs approval and what does not

Security approves what a kind of app may do, not each app's code. It does that with app types: an app type says who its apps may serve, the data they may hold, where their mail may go and which outside services they may call. When a publish passes the security checks, the platform compares the app's permission list with its app type and decides whether the release is Pre-approved, Needs approval or Not allowed. This guide covers app types, that decision, the group map, the source registry, and what aicoded publish shows.

Your organisation's security admin defines its app types and its source registry, and its admin its group map, in the console; every change has a change record.

App types

class in aicoded.yaml names the app's type. An app without class is an Internal tool, internal-tool, which every organisation has:

The app type allows Internal tool
Who uses it, audience.internal anyone in the company: everyone and every group
Data, the highest class in data internal
Mail, email.to_domains the company's own domains: those its people sign in with, and its verified mail domains
Outside services, egress none

Your security admin may define other types, such as finance, with other limits, and may change the Internal tool for your organisation. A class that your organisation has no type of fails the publish (E-REL-019), and the problem lists the types it has. An AI assistant leaves class out unless you or your administrator name a type.

The decision

When a publish passes, aicoded publish and aicoded status show one of these before the status line:

A publish that passes but is not released says Not released: and why, such as a newer publish of the app that came after it, or what the platform does not run yet, such as scheduled jobs (E-REL-017). One whose release did not go live where the app runs says Release failed: and why.

What always needs approval

Whatever the app type allows, a release needs approval when:

What the app type decides

Each of these is Pre-approved within the app type, and needs approval beyond it:

To stay Pre-approved, keep the permission list within the app type, or ask your security admin for an app type that fits the app.

When things change before the release

The platform decides again when it releases, since the app type, the group map or the live version may have changed since the publish passed. A release that was Pre-approved and now needs approval waits, and aicoded status shows the new reasons. A newer publish of the app replaces an older one that has not gone live yet.

A rollback releases an earlier publish again, decided against the app type as it is now. One past a destructive schema change that ran is refused (E-MIG-007).

The group map

People sign in with the company login, whose groups the app never sees. The group map gives names to them: each name stands for a group of the company login or, in an organisation of invited people, for a list of them. The app uses only these names:

A group or a role that the group map does not have fails the publish (E-REL-020), and the problem lists the names it has. On the platform, auth.Viewer(ctx) gives the names the viewer is in, of those the app uses, as both Roles and Groups. They are checked again every 15 minutes: a viewer who left a group loses its role, and one who left the app's audience is signed out of it and sees E-RUN-006.

The source registry

The classes in data are what the builder declares. Security knows better what some sources hold, so the source registry lets your security admin set the class of each of an app's sources, such as sqldb or filestore:invoices. The highest of the declared class and the registry's class counts:

Declare the classes your data really has, so the decision matches what security expects.

The codes

See also

Markdown · Source on GitHub · framework f46741f