# Migrating from 1.0.0-alpha.273 Configuration is served by a component, and a secret is an object. ## Configuration values A component's configuration is held by the `configuration.values` component, which the configuration extension runs as the `configuration-values` service. A deployment carries `TOA_CONFIGURATION_VALUES` on that service — the epoch, the schema and the defaults of every component declaring configuration — and no `TOA_CONFIGURATION__` on the components. The secret variables `TOA_CONFIGURATION__` stay on the components. A context using configuration deploys the exposition gateway, as the values component is exposed, so the context declares the `exposition` annotation. A component asks the service for its configuration when it starts, and waits until there is one. Configuration is changed at runtime, by `POST /configuration/values/:component/` with the `system:configuration:create` role, and running components take the new value. `GET /configuration/values/:component/` answers with the value and the schema it is checked against — `{ configuration, schema, epoch }` — where it used to answer with the configuration alone. `GET /configuration/values/` lists `{ component, epoch, schema, configuration }`. ```yaml foo: deployed ``` ```yaml configuration: foo: deployed schema: type: object properties: foo: type: string epoch: e1 ``` `toa env` writes `TOA_CONFIGURATION_VALUES` into the environment file; `toa mono` runs the values service. `TOA_CONFIGURATION__`, when set, is a local override: the value is taken from it and the service is not used. The values service deploys like any other and must state what it may take, so the configuration annotation reserves `resources` for it. A component named `resources` is written `default.resources`. ```yaml configuration: resources: cpu: [200m, 1000m] memory: [200Mi, 500Mi] dummies.dummy: foo: bye ``` ## Configuration UI The configuration extension serves a page at `/.configuration`, on port `8003`, listing the configured components and creating configurations. Reading it needs `system:configuration:get` and creating needs `system:configuration:create`. ## Secrets are objects A configuration value given as a secret reference (`$NAME`) arrives in the component as a `Secret` object, not a string. `unwrap()` returns the string; `toString()`, JSON and `util.inspect` give ``. ```javascript function transition(input, entity, context) { const key = context.configuration.apiKey } ``` ```javascript function transition(input, entity, context) { const key = context.configuration.apiKey.unwrap() } ``` A value a component reads as a secret is given as a reference: a schema default or a plain string in its place has no `unwrap`. `identity.basic` no longer defaults `pepper` to `''`; it is optional, and a reference when set. The `identity.tokens` keys and the `identity.federation` client `secret` and signature `key` are references, in a development context as well.