@feastalytics/cli 0.1.2 → 0.1.4

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 CHANGED
@@ -93,6 +93,53 @@ To refresh from a local checkout instead of GitHub, run `npx skills add ./feast
93
93
  - `FEAST_API_URL` — override the API base URL (e.g. a local dev server)
94
94
  - `FEAST_API_KEY` — override the static API key
95
95
 
96
+ ### Non-interactive credentials
97
+
98
+ `feast login` stores tokens under `~/.config/feast-cli/` and refreshes them on
99
+ demand. That does not work where there is no interactive login and no writable
100
+ home directory — most importantly inside a sandboxed agent, where the token is
101
+ supplied by the host and must never be readable by the agent itself.
102
+
103
+ Set `FEAST_ACCESS_TOKEN` for that case:
104
+
105
+ ```bash
106
+ export FEAST_ACCESS_TOKEN="$TOKEN"
107
+ export FEAST_ORGANIZATION_ID=4fafb31e-dd46-4081-9778-c298e577a1d1
108
+ export FEAST_PREFERRED_ROLE=OWNER
109
+ feast call listCampaigns
110
+ ```
111
+
112
+ - `FEAST_ACCESS_TOKEN` — access token sent verbatim as `x-access-token`
113
+ - `FEAST_ORGANIZATION_ID` — **pins** the organization
114
+ - `FEAST_PREFERRED_ROLE` — **pins** the role; a role name (`OWNER`) or a full role ARN
115
+
116
+ When `FEAST_ACCESS_TOKEN` is set the CLI reads no token from disk, refreshes
117
+ nothing, and **never decodes the token**. Normally the organization and role are
118
+ read from the token's `cognito:groups` claim, so both must be supplied instead.
119
+
120
+ Not decoding the token is the point, not a limitation: it lets the token be an
121
+ opaque placeholder that a secret store substitutes for the real value after the
122
+ request leaves the machine, so a compromised sandbox yields nothing.
123
+
124
+ `FEAST_ORGANIZATION_ID` and `FEAST_PREFERRED_ROLE` pin the session rather than
125
+ just defaulting it. `--org` and `--role` may repeat the pinned value but cannot
126
+ change it:
127
+
128
+ ```
129
+ $ FEAST_ORGANIZATION_ID=org-A feast call listCampaigns --org org-B
130
+ FEAST_ORGANIZATION_ID pins this session to org-A, so --org org-B is not allowed.
131
+ ```
132
+
133
+ Pinning the role is how you run an agent at **reduced** privilege. The API
134
+ validates a requested role against the user's real Cognito groups, so it will
135
+ happily accept `OWNER` from a user who is an owner — only the pin can hold that
136
+ user's agent down to `VIEWER`.
137
+
138
+ Neither pin is a security boundary on its own: both are ordinary environment
139
+ variables, so anything that can set env vars in the same process tree can change
140
+ them. They stop a tool call from wandering, not a determined process. Scope the
141
+ token itself if you need a hard guarantee.
142
+
96
143
  ## Development
97
144
 
98
145
  ```bash