Help topics

Sealed and hashed fields reference

The Secret option is in the field editor of a text field, in the model editor. Only administrators can change it. See Set a sealed or hashed field for the steps.

Secret options

OptionWhat it doesPlanDefault
Not secretStores the value and returns it as usual.FreeYes
Hashed: verify only, never readableStores a hash of the value. The app can check a value against the hash but cannot return the value.FreeNo
Sealed: encrypted, readable with full accessStores an encrypted value. Only a request with full access returns the plain value.Morphic ProNo
  • Only text fields can be secret. The Secret option appears only for text fields.
  • Without Morphic Pro, the Sealed option reads Sealed: encrypted, readable with full access (Pro). Choosing it resets the option and opens the Morphic Pro page.
  • A field with a secret option shows the badge Hashed or Sealed in the model editor.
  • The help text under Secret reads: "Secrets are redacted in history, webhooks and exports and cannot be filtered."
  • Without Morphic Pro, saving a model with the secret option set to sealed fails with the error secret is one of hash; sealed fields need Morphic Pro.

Enter and change a secret value

  • A value is stored as a hash or as an encrypted value when the entry is saved.
  • A blank value on create stores nothing. If the field is required, the save fails with <field>: required.
  • Sending the text <redacted> keeps the stored value.
  • Leaving the field out of an update keeps the stored value.
  • A blank value sent on update clears a hashed field.
  • On a required secret field, a blank value sent on update returns pin: required even when a value is stored.

Output rules

  • A read without full access returns a hashed value as <redacted>.
  • A read without full access returns a sealed value as <redacted>. Only a request with full access returns the plain value.
  • A read without full access removes hidden fields.
  • Field output and block bindings return an empty value for secret and hidden fields.

Errors

MessageWhere it appearsCause
<field>: required (for example pin: required)Save of an entry, HTTP 422A required secret field has no value.
<field> is a sealed field; sealing needs Morphic ProSave of an entryA sealed value is saved without Morphic Pro.
Morphic fields were not saved: <message>Notice in WordPress admin after a saveSaving the fields attached to a post, user or term failed.
value is too longVerify requestThe value is longer than 4096 characters.
<field> is not a hashed secret (reason not_hash)Verify request, HTTP 422The field is not a Hashed field.
too many attempts; try again in a few minutesVerify requestMore than 10 verify attempts in 5 minutes. See Verify a hashed value through the API.
403Read or verify requestThe caller cannot read the entry.

Encryption key for sealed fields

Sealed values are encrypted with a key. Without your own key, the key comes from the WordPress secure_auth salt. The General tab of Settings shows the card Encryption key for sealed fields with this text: "Sealed fields are encrypted with a key derived from your WordPress salts. To keep them readable after changing salts or moving sites, set your own key in wp-config.php:"

To set your own key, add this line to wp-config.php:

define('MORPHIC_SEAL_KEY', 'a long random secret');

Morphic Pro reads this constant. If the constant is not set, the key is derived from the secure_auth salt. A change of salt or key makes existing sealed values unreadable. They return as <redacted>.

See General settings for the rest of the General tab.