personium / personium-engine

Additional module for personium-core to enable server-side JavaScript execution.
Apache License 2.0
16 stars 7 forks source link

Introduce "_p.asEngine()" method to return an accessor with preset "__engine" accoount and role #34

Open shimono opened 6 years ago

shimono commented 6 years ago

Overview

Introduce a new accessor creation method "asEngine()" in the engine library and make the following code return an accessor with pseudo role "..//engine" and pseudo account "__engine"

  _p.asEngine().cell().

Token spec

Engine should then return an access token with the following spec:

Role Subject
box/_engine {CellURL}#__engine
../__/_engine {CellURL}#__engine

With these modifications, box install alone can enable engine to access any box-local resource by distributing ACL to grant "__engine" to access that resource.

Related Core modification

https://github.com/personium/personium-core/issues/431

considerations.