Given base documents that are available at data/sampleData:
- Create a policy that output all possible hostname.
- Access this policy in REPL and verify your result
- Access this policy via HTTP API and verify your result
[
"hydrogen",
"helium",
"lithium",
"beryllium",
"boron",
"carbon",
"nitrogen",
"oxygen"
]- Create a policy that output all possible app name & hostname combination.
- Access this policy in REPL and verify your result
- Access this policy via HTTP API and verify your result
[
[
"web",
"hydrogen"
],
[
"web",
"helium"
],
[
"web",
"beryllium"
],
[
"web",
"boron"
],
[
"web",
"nitrogen"
],
[
"mysql",
"lithium"
],
[
"mysql",
"carbon"
],
[
"mongodb",
"oxygen"
]
]- Create a policy (named
allowExternalAccess) that:- Given input of a hostname
- the policy return
truewhen the hostname is part of production deployment (i.e. site name is "prod") - otherwise return
false - e.g. the policy should
- return
truefor hostnamehydrogen - return
falsefor hostnameberyllium
- return
- Write test case and run your test cases to verify your result
- Access this policy via HTTP API, supply different hostnames as
inputin your requests and verify your result
- Create a policy (named
task4) that return a list of apps that are usually deployed together.- Hint: Self Join
- Access this policy in REPL and verify your result
- Access this policy via HTTP API and verify your result
[
[
"mysql",
"web"
],
[
"mongodb",
"web"
]
]