aboutsummaryrefslogtreecommitdiffstats
path: root/moon_bouchon/README.md
blob: 11733ceffa0097ca87f6f56b64c28a46b3009419 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
#Moon Bouchon

Moon_bouchon is a fake interface to the Moon platform.
Moon platform can be requested through 2 interfaces:

- ''wrapper'', interface for the OpenStack platform
- ''interface'', interface for other components

## Usage:

### server

To start the server:

    docker run -ti -p 31002:31002 wukongsun/moon_bouchon:v1.0
    # or docker run -dti -p 31002:31002 wukongsun/moon_bouchon:v1.0

### wrapper

Here are the URL, you can request:
    
    POST /wrapper/authz/grant to request the wrapper component with always a "True" response 
    POST /wrapper/authz/deny to request the wrapper component with always a "False" response
    POST /wrapper/authz to request the wrapper component with always a "True" or "False" response

In each request you must pass the following data (or similar):

    {'rule': 'start', 'target': '{"target": {"name": "vm0"}, "user_id": "user0"}', 'credentials': 'null'}

You have examples in the moon_bouchon/tests directory.

### interface

Here are the URL, you can request:
    
    GET /interface/authz/grant/<string:project_id>/<string:subject_name>/<string:object_name>/<string:action_name> to request the interface component with always a "True" response 
    GET /interface/authz/deny/<string:project_id>/<string:subject_name>/<string:object_name>/<string:action_name> to request the interface component with always a "False" response
    GET /interface/authz/<string:project_id>/<string:subject_name>/<string:object_name>/<string:action_name> to request the interface component with always a "True" or "False" response

You have examples in the moon_bouchon/tests directory.