|
|
|
### container |
|
Linux 6.8.0-147-generic |
|
v24.22.2 |
|
uid=0(root) gid=0(root) groups=0(root) |
|
|
|
### 1. no policy file: show |
|
ls: cannot access '/etc/t3code': No such file or directory |
|
No managed policy on this machine. Every setting belongs to the user. |
|
|
|
No T3 Code server is running from this T3 home. The installed policy applies when one starts. |
|
exit=0 |
|
|
|
### 2. check the test policy |
|
{"schemaVersion":1,"organization":"T3 Policy Lab (test)","limits":{"telemetry":false}} |
|
Managed by T3 Policy Lab (test) (/w/test-policy.json, fingerprint 7cc1af3978f9). |
|
|
|
No managed settings. |
|
|
|
Limits: |
|
{ |
|
"telemetry": false |
|
} |
|
|
|
exit=0 |
|
|
|
### 3. deploy to /etc/t3code/policy.json (root:root 0644, dir 0755): show as root |
|
total 12 |
|
drwxr-xr-x 2 root root 4096 Nov 4 05:07 . |
|
drwxr-xr-x 1 root root 4096 Nov 4 05:07 .. |
|
-rw-r--r-- 1 root root 86 Nov 4 05:07 policy.json |
|
Managed by T3 Policy Lab (test) (/etc/t3code/policy.json, fingerprint 7cc1af3978f9). |
|
|
|
No managed settings. |
|
|
|
Limits: |
|
{ |
|
"telemetry": false |
|
} |
|
|
|
No T3 Code server is running from this T3 home. The installed policy applies when one starts. |
|
exit=0 |
|
|
|
### 4. same file, show as an ordinary user |
|
Managed by T3 Policy Lab (test) (/etc/t3code/policy.json, fingerprint 7cc1af3978f9). |
|
|
|
No managed settings. |
|
|
|
Limits: |
|
{ |
|
"telemetry": false |
|
} |
|
|
|
No T3 Code server is running from this T3 home. The installed policy applies when one starts. |
|
exit=0 |
|
|
|
### 5. ordinary user cannot edit it |
|
sh: 1: cannot create /etc/t3code/policy.json: Permission denied |
|
exit=2 |
|
|
|
### 6. user-writable file (0666) |
|
Managed by T3 Policy Lab (test) (/etc/t3code/policy.json, fingerprint 7cc1af3978f9). |
|
|
|
No managed settings. |
|
|
|
Limits: |
|
{ |
|
"telemetry": false |
|
} |
|
|
|
No T3 Code server is running from this T3 home. The installed policy applies when one starts. |
|
exit=0 |
|
|
|
### 7. unknown key refused |
|
file:///w/policy-cli.mjs:65044 |
|
new ManagedPolicyFileError({ |
|
^ |
|
|
|
ManagedPolicyFileError: T3 Code cannot use the managed policy at /etc/t3code/policy.json: it is not valid JSON or does not match the policy schema (Expected no excess property at ["futureKey"]). It will not start until an administrator fixes this. |
|
at decodeDocument (file:///w/policy-cli.mjs:65044:5) |
|
at file:///w/policy-cli.mjs:65064:17 |
|
at Generator.next (<anonymous>) |
|
at ~effect/Effect/successCont (file:///w/policy-cli.mjs:3828:28) |
|
at ~effect/Effect/evaluate (file:///w/policy-cli.mjs:1207:30) |
|
at FiberImpl.runLoop (file:///w/policy-cli.mjs:3394:99) |
|
at FiberImpl.evaluate (file:///w/policy-cli.mjs:3338:24) |
|
at AsyncResource.runInAsyncScope (node:async_hooks:227:14) |
|
at FiberImpl.evaluate (file:///w/policy-cli.mjs:3329:29) |
|
at file:///w/policy-cli.mjs:3658:18 { |
|
_tag: 'ManagedPolicyFileError', |
|
path: '/etc/t3code/policy.json', |
|
reason: 'it is not valid JSON or does not match the policy schema (Expected no excess property at ["futureKey"])', |
|
[cause]: CauseImpl { |
|
'~effect/Cause': '~effect/Cause', |
|
reasons: [ |
|
Fail { |
|
'~effect/Cause/Reason': '~effect/Cause/Reason', |
|
annotations: Map(0) {}, |
|
_tag: 'Fail', |
|
error: [SchemaError: Expected no excess property |
|
at ["futureKey"]] { |
|
issue: Composite { |
|
'~effect/SchemaIssue/Issue': '~effect/SchemaIssue/Issue', |
|
_tag: 'Composite', |
|
ast: [Objects], |
|
issues: [Array] |
|
}, |
|
_tag: 'SchemaError', |
|
'~effect/Schema/SchemaError': '~effect/Schema/SchemaError' |
|
} |
|
} |
|
] |
|
} |
|
} |
|
|
|
Node.js v24.22.2 |
|
exit=1 |
|
|
|
### 8. broken JSON refused |
|
file:///w/policy-cli.mjs:65044 |
|
new ManagedPolicyFileError({ |
|
^ |
|
|
|
ManagedPolicyFileError: T3 Code cannot use the managed policy at /etc/t3code/policy.json: it is not valid JSON or does not match the policy schema (Expected a valid JSON string). It will not start until an administrator fixes this. |
|
at decodeDocument (file:///w/policy-cli.mjs:65044:5) |
|
at file:///w/policy-cli.mjs:65064:17 |
|
at Generator.next (<anonymous>) |
|
at ~effect/Effect/successCont (file:///w/policy-cli.mjs:3828:28) |
|
at ~effect/Effect/evaluate (file:///w/policy-cli.mjs:1207:30) |
|
at FiberImpl.runLoop (file:///w/policy-cli.mjs:3394:99) |
|
at FiberImpl.evaluate (file:///w/policy-cli.mjs:3338:24) |
|
at AsyncResource.runInAsyncScope (node:async_hooks:227:14) |
|
at FiberImpl.evaluate (file:///w/policy-cli.mjs:3329:29) |
|
at file:///w/policy-cli.mjs:3658:18 { |
|
_tag: 'ManagedPolicyFileError', |
|
path: '/etc/t3code/policy.json', |
|
reason: 'it is not valid JSON or does not match the policy schema (Expected a valid JSON string)', |
|
[cause]: CauseImpl { |
|
'~effect/Cause': '~effect/Cause', |
|
reasons: [ |
|
Fail { |
|
'~effect/Cause/Reason': '~effect/Cause/Reason', |
|
annotations: Map(0) {}, |
|
_tag: 'Fail', |
|
error: [SchemaError: Expected a valid JSON string] { |
|
issue: Encoding { |
|
'~effect/SchemaIssue/Issue': '~effect/SchemaIssue/Issue', |
|
_tag: 'Encoding', |
|
ast: [Objects], |
|
issue: [InvalidValue] |
|
}, |
|
_tag: 'SchemaError', |
|
'~effect/Schema/SchemaError': '~effect/Schema/SchemaError' |
|
} |
|
} |
|
] |
|
} |
|
} |
|
|
|
Node.js v24.22.2 |
|
exit=1 |
|
|
|
### 9. file removed: no policy again |
|
No managed policy on this machine. Every setting belongs to the user. |
|
|
|
No T3 Code server is running from this T3 home. The installed policy applies when one starts. |
|
exit=0 |
|
|
|
### 10. templates generated on Linux |
|
/out/windows/t3code.admx |
|
/out/windows/en-US/t3code.adml |
|
/out/macos/t3code.mobileconfig |
|
exit=0 |
|
e9cc455c149e4233f95069fb0a557f15d0e205b6ff4fe27baa5effb8190d9396 ./macos/t3code.mobileconfig |
|
b7f26286efcb53a4014324a2f36ee6b1a3d4e30062f70245b7247a7c56774b0c ./windows/en-US/t3code.adml |
|
e5cc6e457fdc8e18797ce1dcb432b60116633df721584a257b1e7e9ef16450cf ./windows/t3code.admx |