ory patch Error: value for /services/oauth2/config'/strategies/access_token must be valid JSON but got: opaque'
Open
Nobody has claimed this yet.
bug
- Dominant language
- Go
- Stars
- 47
- Forks
- 26
- PR merge metrics
- No merged PRs in 30d
Description
Preflight checklist
- I could not find a solution in the existing issues, docs, nor discussions.
- I agree to follow this project's Code of Conduct.
- I have read and am following this repository's Contribution Guidelines.
- I have joined the Ory Community Slack.
- I am signed up to the Ory Security Patch Newsletter.
Ory Network Project
No response
Describe the bug
The ory patch command does not work. The examples returned do not work.
Reproducing the bug
Run the patch command:
ory patch oauth2-config project-uuid-here --replace '/strategies/access_token="opaque"'
Get error response:
Usage:
ory patch oauth2-config [project-id] [flags]
Aliases:
oauth2-config, oc, hydra-config
Examples:
$ ory patch oauth2-config ecaaa3cb-0730-4ee8-a6df-9553cdfeef89 \
--replace '/strategies/access_token="jwt"' \
--add '/ttl/login_consent_request="1h"' \
--remove '/strategies/scope' \
--format json-pretty
{
"oauth2": {
"client_credentials": {
"default_grant_allowed_scope": false
},
"expose_internal_errors": true,
"grant": {
"jwt": {
"iat_optional": false,
"jti_optional": false,
"max_ttl": "720h0m0s"
}
}
},
// ...
}
Flags:
--add stringArray Add a specific key to the configuration
-f, --file strings Configuration file(s) (file://config.json, https://example.org/config.yaml, ...) to update the project
--format string Set the output format. One of table, json, yaml, json-pretty, jsonpath and jsonpointer. (default "default")
-h, --help help for oauth2-config
-q, --quiet Be quiet with output printing.
--remove stringArray Remove a specific key from the configuration
--replace stringArray Replace a specific key in the configuration
-y, --yes Confirm all dialogs with yes.
Global Flags:
-c, --config string Path to the Ory Network configuration file.
value for /services/oauth2/config'/strategies/access_token must be valid JSON but got: opaque'
Note:
This is running the exact example return, which doesn't work:
runnning:
$ ory patch oauth2-config project-uuid-here --replace '/strategies/access_token="opaque"'
Example shown:
$ ory patch oauth2-config ecaaa3cb-0730-4ee8-a6df-9553cdfeef89 \
--replace '/strategies/access_token="jwt"'
Relevant log output
No response
Relevant configuration
No response
Version
v0.3.2
On which operating system are you observing this issue?
Windows
In which environment are you deploying?
Ory Network
Additional Context
No response
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the ory patch oauth2-config command and reproduce the documented --replace example on Windows using version v0.3.2. Compare how the command parses the /strategies/access_token value with the example shown in the usage output. Done means the documented command works as shown or the example and parsing behavior are made consistent.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- cli
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100