@grwnd/pi-governance 1.9.1 → 2.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/extensions/index.cjs +14 -14
- package/dist/extensions/index.cjs.map +1 -1
- package/dist/extensions/index.js +14 -14
- package/dist/extensions/index.js.map +1 -1
- package/dist/index.cjs +14 -14
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +14 -14
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -3068,9 +3068,9 @@ import { Value } from "@sinclair/typebox/value";
|
|
|
3068
3068
|
// src/lib/config/schema.ts
|
|
3069
3069
|
import { Type } from "@sinclair/typebox";
|
|
3070
3070
|
var AuthEnvConfig = Type.Object({
|
|
3071
|
-
user_var: Type.String({ default: "
|
|
3072
|
-
role_var: Type.String({ default: "
|
|
3073
|
-
org_unit_var: Type.String({ default: "
|
|
3071
|
+
user_var: Type.String({ default: "PI_RBAC_USER" }),
|
|
3072
|
+
role_var: Type.String({ default: "PI_RBAC_ROLE" }),
|
|
3073
|
+
org_unit_var: Type.String({ default: "PI_RBAC_ORG_UNIT" })
|
|
3074
3074
|
});
|
|
3075
3075
|
var AuthLocalConfig = Type.Object({
|
|
3076
3076
|
users_file: Type.String({ default: "./users.yaml" })
|
|
@@ -3218,9 +3218,9 @@ var DEFAULTS = {
|
|
|
3218
3218
|
auth: {
|
|
3219
3219
|
provider: "env",
|
|
3220
3220
|
env: {
|
|
3221
|
-
user_var: "
|
|
3222
|
-
role_var: "
|
|
3223
|
-
org_unit_var: "
|
|
3221
|
+
user_var: "PI_RBAC_USER",
|
|
3222
|
+
role_var: "PI_RBAC_ROLE",
|
|
3223
|
+
org_unit_var: "PI_RBAC_ORG_UNIT"
|
|
3224
3224
|
}
|
|
3225
3225
|
},
|
|
3226
3226
|
policy: {
|
|
@@ -3262,7 +3262,7 @@ var DEFAULTS = {
|
|
|
3262
3262
|
// src/lib/config/loader.ts
|
|
3263
3263
|
function getConfigPaths() {
|
|
3264
3264
|
return [
|
|
3265
|
-
process.env["
|
|
3265
|
+
process.env["PI_RBAC_GOVERNANCE_CONFIG"],
|
|
3266
3266
|
".pi/governance.yaml",
|
|
3267
3267
|
`${process.env["HOME"]}/.pi/agent/governance.yaml`
|
|
3268
3268
|
];
|
|
@@ -3401,7 +3401,7 @@ async function createPolicyEngine(config) {
|
|
|
3401
3401
|
|
|
3402
3402
|
// src/lib/identity/env-provider.ts
|
|
3403
3403
|
var EnvIdentityProvider = class {
|
|
3404
|
-
constructor(userVar = "
|
|
3404
|
+
constructor(userVar = "PI_RBAC_USER", roleVar = "PI_RBAC_ROLE", orgUnitVar = "PI_RBAC_ORG_UNIT") {
|
|
3405
3405
|
this.userVar = userVar;
|
|
3406
3406
|
this.roleVar = roleVar;
|
|
3407
3407
|
this.orgUnitVar = orgUnitVar;
|
|
@@ -5207,15 +5207,15 @@ var WIZARD_HTML = `<!DOCTYPE html>
|
|
|
5207
5207
|
<div class="field-row-3">
|
|
5208
5208
|
<div class="field">
|
|
5209
5209
|
<label>User Var</label>
|
|
5210
|
-
<input type="text" id="auth-user-var" value="
|
|
5210
|
+
<input type="text" id="auth-user-var" value="PI_RBAC_USER" onchange="updatePreview()">
|
|
5211
5211
|
</div>
|
|
5212
5212
|
<div class="field">
|
|
5213
5213
|
<label>Role Var</label>
|
|
5214
|
-
<input type="text" id="auth-role-var" value="
|
|
5214
|
+
<input type="text" id="auth-role-var" value="PI_RBAC_ROLE" onchange="updatePreview()">
|
|
5215
5215
|
</div>
|
|
5216
5216
|
<div class="field">
|
|
5217
5217
|
<label>Org Unit Var</label>
|
|
5218
|
-
<input type="text" id="auth-org-unit-var" value="
|
|
5218
|
+
<input type="text" id="auth-org-unit-var" value="PI_RBAC_ORG_UNIT" onchange="updatePreview()">
|
|
5219
5219
|
</div>
|
|
5220
5220
|
</div>
|
|
5221
5221
|
</div>
|
|
@@ -5665,9 +5665,9 @@ function buildGovernanceConfig() {
|
|
|
5665
5665
|
cfg.auth = { provider: authProvider };
|
|
5666
5666
|
if (authProvider === 'env') {
|
|
5667
5667
|
cfg.auth.env = {
|
|
5668
|
-
user_var: document.getElementById('auth-user-var').value || '
|
|
5669
|
-
role_var: document.getElementById('auth-role-var').value || '
|
|
5670
|
-
org_unit_var: document.getElementById('auth-org-unit-var').value || '
|
|
5668
|
+
user_var: document.getElementById('auth-user-var').value || 'PI_RBAC_USER',
|
|
5669
|
+
role_var: document.getElementById('auth-role-var').value || 'PI_RBAC_ROLE',
|
|
5670
|
+
org_unit_var: document.getElementById('auth-org-unit-var').value || 'PI_RBAC_ORG_UNIT'
|
|
5671
5671
|
};
|
|
5672
5672
|
} else if (authProvider === 'local') {
|
|
5673
5673
|
cfg.auth.local = {
|