Skip to content

osy 0.19.9

Choose a tag to compare

@osysharp-publisher osysharp-publisher released this 13 Nov 08:58

This release makes an app's settings obey its organisation's policy: a setting a package declares governed reads as the organisation's rule says, wherever the app reads it. It also fixes a page that could not load in a new browser after its cached tree was swept, and a settings page that read its change history once per field; and in Osyrin Cloud's Admin, setting a secret from the browser for a zone at another address, the warning a deploy token's deploy gave, and the Policy page. A few things that ran before now answer differently; each has its fix beside it. To upgrade, run osy upgrade, then osy update in a project.

Breaking changes

  • A governed setting reads as the organisation's policy says. App.Setting<T>() now applies the rules of the organisation's policy version in force to every member a package declares with [OrgPolicy], for the package's code and the app's code alike: a lock gives the organisation's value whatever the app assigns, a range holds the app's value to its bounds, and a default gives the organisation's value where the app's source does not assign the member. A new policy version binds from the next request; a later version without the rule gives the app's own value back. Who sees a difference: an app that composes a package with [OrgPolicy] members (for example the user-accounts kit's sign-up switch and minimum password length) in an organisation whose policy sets one of them. With no policy in force, or a policy that names none of the app's settings, the app reads its own values as before. Fix: none needed; to change a governed value, change the organisation's policy, not the app.
  • A governed setting that cannot be read is refused, not guessed. When the policy in force sets a lock or a range the server cannot read (its rules are missing, or the organisation's answer cannot be had), the read fails with a policy refusal that names the setting ("The setting … is refused: …"); it never falls back to the app's value or the package's default. A default that cannot be read is ignored. Who can be newly refused: an app reading a governed setting while its organisation's policy cannot be read. Fix: none in the app; once the organisation's policy can be read again (an operator's step), read again.
  • A value worked out from a governed setting is kept for one request only. A setting your app computes from a class that has a governed member is worked out again for each request instead of being kept across requests, so it follows the policy. Values that read no governed class are kept as before. Who sees a difference: an app whose worked-out setting is costly to compute; work outside a request (a worker, a workflow step, a scheduled job) works it out at every read. Fix: none needed; to keep a costly value, work it out from a class with no governed member.

Organisation policy

  • The policy is read once per request. The first read of a governed setting in a request asks for the organisation's answer; later reads in that request use it. A single server reads the policy again when it is changed there, on a version's start date, and otherwise every 30 seconds; a zone answers from the latest description of the zone it holds.
  • On a zone, an app the zone's description does not cover is refused a locked or ranged setting. When the zone's description does not say what the app's organisation's policy is (no description yet, the app not in it, or its organisation not described), a setting a package declares with a lock or a range cannot be read and is refused, even when the organisation has no policy.
  • A registry that cannot be reached. A server whose last answer was "no version in force" keeps serving that answer, with one warning per outage; any other last answer, or none, refuses as above.

Fixes

  • A page loads in a fresh browser after its cached tree was swept. A page's tree is again served to a browser that does not hold it yet after the server's cache sweep dropped the tree's entry while the page stayed in use; before, such a browser got "not found" for the tree until the app was deployed again.
  • A settings page asks for its change history once. A page that shows a row's change history next to several of its fields reads that history in one statement again, where it read it once per field.

Osyrin Cloud

  • A secret can be set from Admin for an app on a zone at another address. Admin's Secrets page could not send a value to a zone whose gateway has an address of its own: the browser refused the request before it left. It now can. When a set fails, the form says so on the spot, says "Nothing was changed" where that is true, and asks for the value again.
  • A deploy by an app's deploy token no longer warns that a set secret has no value. The deploy now sees which of the app's secrets a person has already set, and warns only of the ones nobody has.
  • Admin's Policy page. An organisation's policy is managed on one page with three tabs: Policies (what is in force, what the rules are), Versions (each version and its approvals, approving a draft, and starting a new draft from a replaced version), and Approvals (how many approvals a version needs, and whether machine accounts may approve; a machine account can change neither).
  • Admin's pages in the new look. Admin's tables stack into one column on a phone, and a card no longer clips a menu or a hover title that leaves it.