0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-02-03 23:00:14 -05:00
ghost/core/test/unit/models
Fabien O'Carroll d246a4761e Implemented externally verifiable identity tokens
no-issue

This adds two new endpoints, one at /ghost/.well-known/jwks.json for exposing
a public key, and one on the canary api /identities, which allows the
Owner user to fetch a JWT.

This token can then be used by external services to verify the domain

* Added ghost_{public,private}_key settings

    This key can be used for generating tokens for communicating with
    external services on behalf of Ghost

* Added .well-known directory to /ghost/.well-known

    We add a jwks.json file to the .well-known directory which exposes a
    public JWK which can be used to verify the signatures of JWT's created
    by Ghost

    This is added to the /ghost/ path so that it can live on the admin
    domain, rather than the frontend. This is because most of its
    uses/functions will be in relation to the admin domain.

* Improved settings model tests

    This removes hardcoded positions in favour of testing that a particular
    event wasn't emitted which is less brittle and more precise about what's
    being tested

* Fixed parent app unit tests for well-known

    This updates the parent app unit tests to check that the well-known
    route is mounted. We all change proxyquire to use `noCallThru` which
    ensures that the ubderlying modules are not required. This stops the
    initialisation logic in ./well-known erroring in tests

https://github.com/thlorenz/proxyquire/issues/215

* Moved jwt signature to a separate 'token' propery

    This structure corresponds to other resources and allows to exptend with
    additional properties in future if needed
2020-03-16 13:22:04 +01:00
..
base 🔥 Removed v0.1 leftover code in model layer (#11107) 2019-09-12 17:39:16 +02:00
plugins
api-key_spec.js Shortened admin key length (#10418) 2019-01-24 13:46:33 +00:00
integration_spec.js Ensured Admin API cannot fetch internal integrations (#10501) 2019-07-24 11:52:55 +02:00
invite_spec.js
member_spec.js Added member.avatar_image for member gravatars in themes (#11584) 2020-02-19 10:08:12 +00:00
permission_spec.js
post_spec.js Merge branch 'master' into v3 2019-10-09 15:04:09 +01:00
session_spec.js Update Test & linting packages (major) (#10858) 2019-07-05 13:40:43 +02:00
settings_spec.js Implemented externally verifiable identity tokens 2020-03-16 13:22:04 +01:00
tag_spec.js
user_spec.js 🐛 Disallowed locked/suspended users from being made owner via the API (#10647) 2019-04-16 10:30:29 +01:00