Shared libraries used in the ORY ecosystem. Use at your own risk. Breaking changes should be anticipated.
ory / x Goto Github PK
View Code? Open in Web Editor NEWLibraries used in the Ory ecosystem
License: Apache License 2.0
Libraries used in the Ory ecosystem
License: Apache License 2.0
No response
The current strings and stringslice works fine with string but not custom typed 'enum' string.
im using code like this locally with ~string
type constraint:
// Has returns true if the needle is in the haystack (case-sensitive)
func Has[T ~string](haystack []T, needle T) bool {
for _, current := range haystack {
if current == needle {
return true
}
}
return false
}
mapping list of enums into string manually first, then use original stringslice.Has
v0.0.614
open to any comment regarding of using type constraint
Setting up a cors.allowed_origins
with a value of https://*.example.com
will:
https://foo.example.com
✔️https://foo.bar.example.com
❌allowed_origins
of https://*.example.com
:* Trying 127.0.0.1:4444...
* Connected to 127.0.0.1 (127.0.0.1) port 4444 (#0)
> GET /.well-known/openid-configuration HTTP/1.1
> Host: 127.0.0.1:4444
> User-Agent: curl/7.74.0
> Accept: */*
> Origin: https://foo.example.com
>
* Mark bundle as not supporting multiuse
< HTTP/1.1 200 OK
< Access-Control-Allow-Credentials: true
< Access-Control-Allow-Origin: https://foo.example.com
< Access-Control-Expose-Headers: Cache-Control, Expires, Last-Modified, Pragma, Content-Length, Content-Language, Content-Type
< Cache-Control: private, no-cache, no-store, must-revalidate
< Content-Type: application/json; charset=utf-8
< Vary: Origin
< Date: Thu, 23 Mar 2023 15:49:59 GMT
< Content-Length: 1508
<
{"issuer":"http://127.0.0.1:4444","authorization_endpoint":"http://127.0.0.1:4444/oauth2/auth","token_endpoint":"http://127.0.0.1:4444/oauth2/token","jwks_uri":"http://127.0.0.1:4444/.well-known/jwks.json","subject_types_supported":["pairwise","public"],"response_types_supported":["code","code id_token","id_token","token id_token","token","token id_token code"],"claims_supported":["sub"],"grant_types_supported":["authorization_code","implicit","client_credentials","refresh_token"],"response_modes_supported":["query","fragment"],"userinfo_endpoint":"http://127.0.0.1:4444/userinfo","scopes_supported":["offline_access","offline","openid"],"token_endpoint_auth_methods_supported":["client_secret_post","client_secret_basic","private_key_jwt","none"],"userinfo_signing_alg_values_supported":["none","RS256"],"id_token_signing_alg_values_supported":["RS256"],"id_token_signed_response_alg":["RS256"],"userinfo_signed_response_alg":["RS256"],"request_parameter_supported":true,"request_uri_parameter_supported":true,"require_request_uri_registration":true,"claims_parameter_supported":false,"revocation_endpoint":"http://127.0.0.1:4444/oauth2/revoke","backchannel_logout_supported":true,"backchannel_logout_session_supported":true,"frontchannel_logout_supported":true,"frontchannel_logout_session_supported":true,"end_session_endpoint":"http://127.0.0.1:4444/oauth2/sessions/logout","request_object_signing_alg_values_supported":["none","RS256","ES256"],"code_challenge_methods_supported":["plain","S256"]}
* Connection #0 to host 127.0.0.1 left intact
* Trying 127.0.0.1:4444...
* Connected to 127.0.0.1 (127.0.0.1) port 4444 (#0)
> GET /.well-known/openid-configuration HTTP/1.1
> Host: 127.0.0.1:4444
> User-Agent: curl/7.74.0
> Accept: */*
> Origin: https://foo.bar.example.com
>
* Mark bundle as not supporting multiuse
< HTTP/1.1 200 OK
< Cache-Control: private, no-cache, no-store, must-revalidate
< Content-Type: application/json; charset=utf-8
< Vary: Origin
< Date: Thu, 23 Mar 2023 15:50:13 GMT
< Content-Length: 1508
<
{"issuer":"http://127.0.0.1:4444","authorization_endpoint":"http://127.0.0.1:4444/oauth2/auth","token_endpoint":"http://127.0.0.1:4444/oauth2/token","jwks_uri":"http://127.0.0.1:4444/.well-known/jwks.json","subject_types_supported":["pairwise","public"],"response_types_supported":["code","code id_token","id_token","token id_token","token","token id_token code"],"claims_supported":["sub"],"grant_types_supported":["authorization_code","implicit","client_credentials","refresh_token"],"response_modes_supported":["query","fragment"],"userinfo_endpoint":"http://127.0.0.1:4444/userinfo","scopes_supported":["offline_access","offline","openid"],"token_endpoint_auth_methods_supported":["client_secret_post","client_secret_basic","private_key_jwt","none"],"userinfo_signing_alg_values_supported":["none","RS256"],"id_token_signing_alg_values_supported":["RS256"],"id_token_signed_response_alg":["RS256"],"userinfo_signed_response_alg":["RS256"],"request_parameter_supported":true,"request_uri_parameter_supported":true,"require_request_uri_registration":true,"claims_parameter_supported":false,"revocation_endpoint":"http://127.0.0.1:4444/oauth2/revoke","backchannel_logout_supported":true,"backchannel_logout_session_supported":true,"frontchannel_logout_supported":true,"frontchannel_logout_session_supported":true,"end_session_endpoint":"http://127.0.0.1:4444/oauth2/sessions/logout","request_object_signing_alg_values_supported":["none","RS256","ES256"],"code_challenge_methods_supported":["plain","S256"]}
* Connection #0 to host 127.0.0.1 left intact
tmp-hydra-1 | time=2023-03-23T15:49:19Z level=info msg=No tracer configured - skipping tracing setup audience=application service_name=Ory Hydra service_version=v2.0.3
tmp-hydra-1 | Thank you for using Ory Hydra v2.0.3!
tmp-hydra-1 |
tmp-hydra-1 | Take security seriously and subscribe to the Ory Security Newsletter. Stay on top of new patches and security insights.
tmp-hydra-1 |
tmp-hydra-1 | >> Subscribe now: http://eepurl.com/di390P <<
tmp-hydra-1 | time=2023-03-23T15:49:19Z level=info msg=Software quality assurance features are enabled. Learn more at: https://www.ory.sh/docs/ecosystem/sqa audience=application service_name=Ory Hydra service_version=v2.0.3
tmp-hydra-1 | time=2023-03-23T15:49:19Z level=info msg=Setting up http server on :4445 audience=application service_name=Ory Hydra service_version=v2.0.3
tmp-hydra-1 | time=2023-03-23T15:49:19Z level=info msg=Setting up http server on :4444 audience=application service_name=Ory Hydra service_version=v2.0.3
tmp-hydra-1 | time=2023-03-23T15:49:19Z level=warning msg=HTTPS is disabled. Please ensure that your proxy is configured to provide HTTPS, and that it redirects HTTP to HTTPS. audience=application service_name=Ory Hydra service_version=v2.0.3
tmp-hydra-migrate-1 exited with code 0
tmp-hydra-1 | time=2023-03-23T15:49:40Z level=info msg=started handling request http_request=map[headers:map[accept:*/* origin:https://foo.example.com user-agent:curl/7.74.0] host:127.0.0.1:4444 method:GET path:/.well-known/openid-configuration query:<nil> remote:172.20.0.1:41980 scheme:http]
tmp-hydra-1 | time=2023-03-23T15:49:40Z level=warning msg=JSON Web Key Set "hydra.openid.id-token" does not exist yet, generating new key pair... audience=application service_name=Ory Hydra service_version=v2.0.3
tmp-hydra-1 | time=2023-03-23T15:49:45Z level=info msg=completed handling request http_request=map[headers:map[accept:*/* origin:https://foo.example.com user-agent:curl/7.74.0] host:127.0.0.1:4444 method:GET path:/.well-known/openid-configuration query:<nil> remote:172.20.0.1:41980 scheme:http] http_response=map[headers:map[access-control-allow-credentials:true access-control-allow-origin:https://foo.example.com access-control-expose-headers:Cache-Control, Expires, Last-Modified, Pragma, Content-Length, Content-Language, Content-Type cache-control:private, no-cache, no-store, must-revalidate content-type:application/json; charset=utf-8 vary:Origin] size:1508 status:200 text_status:OK took:5.211230284s]
tmp-hydra-1 | time=2023-03-23T15:49:55Z level=info msg=started handling request http_request=map[headers:map[accept:*/* origin:https://foo.example.com user-agent:curl/7.74.0] host:127.0.0.1:4444 method:GET path:/.well-known/openid-configuration query:<nil> remote:172.20.0.1:36060 scheme:http]
tmp-hydra-1 | time=2023-03-23T15:49:55Z level=info msg=completed handling request http_request=map[headers:map[accept:*/* origin:https://foo.example.com user-agent:curl/7.74.0] host:127.0.0.1:4444 method:GET path:/.well-known/openid-configuration query:<nil> remote:172.20.0.1:36060 scheme:http] http_response=map[headers:map[access-control-allow-credentials:true access-control-allow-origin:https://foo.example.com access-control-expose-headers:Cache-Control, Expires, Last-Modified, Pragma, Content-Length, Content-Language, Content-Type cache-control:private, no-cache, no-store, must-revalidate content-type:application/json; charset=utf-8 vary:Origin] size:1508 status:200 text_status:OK took:1.12961ms]
tmp-hydra-1 | time=2023-03-23T15:49:59Z level=info msg=started handling request http_request=map[headers:map[accept:*/* origin:https://foo.example.com user-agent:curl/7.74.0] host:127.0.0.1:4444 method:GET path:/.well-known/openid-configuration query:<nil> remote:172.20.0.1:36064 scheme:http]
tmp-hydra-1 | time=2023-03-23T15:49:59Z level=info msg=completed handling request http_request=map[headers:map[accept:*/* origin:https://foo.example.com user-agent:curl/7.74.0] host:127.0.0.1:4444 method:GET path:/.well-known/openid-configuration query:<nil> remote:172.20.0.1:36064 scheme:http] http_response=map[headers:map[access-control-allow-credentials:true access-control-allow-origin:https://foo.example.com access-control-expose-headers:Cache-Control, Expires, Last-Modified, Pragma, Content-Length, Content-Language, Content-Type cache-control:private, no-cache, no-store, must-revalidate content-type:application/json; charset=utf-8 vary:Origin] size:1508 status:200 text_status:OK took:1.361447ms]
tmp-hydra-1 | time=2023-03-23T15:50:13Z level=info msg=started handling request http_request=map[headers:map[accept:*/* origin:https://foo.bar.example.com user-agent:curl/7.74.0] host:127.0.0.1:4444 method:GET path:/.well-known/openid-configuration query:<nil> remote:172.20.0.1:60756 scheme:http]
tmp-hydra-1 | time=2023-03-23T15:50:13Z level=info msg=completed handling request http_request=map[headers:map[accept:*/* origin:https://foo.bar.example.com user-agent:curl/7.74.0] host:127.0.0.1:4444 method:GET path:/.well-known/openid-configuration query:<nil> remote:172.20.0.1:60756 scheme:http] http_response=map[headers:map[cache-control:private, no-cache, no-store, must-revalidate content-type:application/json; charset=utf-8 vary:Origin] size:1508 status:200 text_status:OK took:1.415227ms]
serve:
public:
cors:
enabled: true
allowed_origins:
- https://*.example.com
cookies:
same_site_mode: Lax
urls:
self:
issuer: http://127.0.0.1:4444
consent: http://127.0.0.1:3000/consent
login: http://127.0.0.1:3000/login
logout: http://127.0.0.1:3000/logout
secrets:
system:
- youReallyNeedToChangeThis
oidc:
subject_identifiers:
supported_types:
- pairwise
- public
pairwise:
salt: youReallyNeedToChangeThis
Hydra 2.0.3
Linux
Kubernetes with Helm
No response
Is your feature request related to a problem? Please describe.
At the moment, jsonschemax.ListPaths
will return an error if a circular dependency is observed.
Describe the solution you'd like
It should be possible to use a modifier that allows circular dependencies by simply aborting the current recursion branch but not the recursion as a whole.
Tracing providers
have been removed when refactoring to otel.
Readd those providers.
No alternatives
master
No response
No response
When I set tracing.providers.otlp.server_url
to the URL given by Grafana cloud (https://otlp-gateway-prod-gb-south-0.grafana.net/otlp
), Hydra logs show "The configuration contains values or keys which are invalid" and three regexes that look like they should match an ipv4 address and host, ipv6 address and host, or domain name and host.
Digging into the code SetupOTLP in otelx/otlp.go, you're calling otlptracehttp.WithEndpoint
, which does only accept a host/address and port number, but that should also be called with WithURLpath
since not all providers (e.g., Grafana Cloud) use the standard path.
What I'd really like you to do is not call any of the With*
methods at all, and let otlptracehttp pick up it's config from the environment, in line with other otlp collectors.
tracing:
providers:
otlp:
server_url: otlp-gateway-prod-gb-south-0.grafana.net/otlp
Jan 12 23:29:15 example.com hydra-server[56720]: The configuration contains values or keys which are invalid:
Jan 12 23:29:15 example.com hydra-server[56720]: tracing: map[provider:otel providers:map[otlp:map[server_url:https://otlp-gateway-prod-gb-south-0.grafana.net/otlp]]]
Jan 12 23:29:15 example.com hydra-server[56720]: ^-- doesn't validate with "ory://tracing-config#"
Jan 12 23:29:15 example.com hydra-server[56720]:
Jan 12 23:29:15 example.com hydra-server[56720]: The configuration contains values or keys which are invalid:
Jan 12 23:29:15 example.com hydra-server[56720]: tracing.providers.otlp.server_url: https://otlp-gateway-prod-gb-south-0.grafana.net/otlp
Jan 12 23:29:15 example.com hydra-server[56720]: ^-- anyOf failed
Jan 12 23:29:15 example.com hydra-server[56720]:
Jan 12 23:29:15 example.com hydra-server[56720]: The configuration contains values or keys which are invalid:
Jan 12 23:29:15 example.com hydra-server[56720]: tracing.providers.otlp.server_url: https://otlp-gateway-prod-gb-south-0.grafana.net/otlp
Jan 12 23:29:15 example.com hydra-server[56720]: ^-- does not match pattern "^\\[(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))]:([0-9]*)$"
Jan 12 23:29:15 example.com hydra-server[56720]:
Jan 12 23:29:15 example.com hydra-server[56720]: The configuration contains values or keys which are invalid:
Jan 12 23:29:15 example.com hydra-server[56720]: tracing.providers.otlp.server_url: https://otlp-gateway-prod-gb-south-0.grafana.net/otlp
Jan 12 23:29:15 example.com hydra-server[56720]: ^-- does not match pattern "^([0-9]{1,3}\\.){3}[0-9]{1,3}:([0-9]*)$"
Jan 12 23:29:15 example.com hydra-server[56720]:
Jan 12 23:29:15 example.com hydra-server[56720]: The configuration contains values or keys which are invalid:
Jan 12 23:29:15 example.com hydra-server[56720]: tracing.providers.otlp.server_url: https://otlp-gateway-prod-gb-south-0.grafana.net/otlp
Jan 12 23:29:15 example.com hydra-server[56720]: ^-- does not match pattern "^(([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\\-]*[a-zA-Z0-9])\\.)*([A-Za-z0-9]|[A-Za-z0-9][A-Za-z0-9\\-]*[A-Za-z0-9]):([0-9]*)$"
Jan 12 23:29:15 example.com hydra-server[56720]:
Jan 12 23:29:15 example.com hydra-server[56720]: {"audience":"application","event":"&jsonschema.ValidationError{Message:\"doesn't validate with \\\"ory://tracing-config#\\\"\", InstancePtr:\"#/tracing\", SchemaURL:\"https://github.com/ory/hydra/spec/config.json\", SchemaPtr:\"#/properties/tracing/$ref\", Context:jsonschema.ValidationErrorContext(nil), Causes:[]*jsonschema.ValidationError{(*jsonschema.ValidationError)(0xc00095a000)}}","level":"error","msg":"The changed configuration is invalid and could not be loaded. Rolling back to the last working configuration revision. Please address the validation errors before restarting the process.","service_name":"Ory Hydra","service_version":"v2.2.0-rc.3","time":"2024-01-12T23:29:15.154613904Z"}
tracing:
providers:
otlp:
server_url: otlp-gateway-prod-gb-south-0.grafana.net/otlp
2.2.0-rc.3
Linux
Other
I'm running the container under podman on a linux host. Otherwise my install is fine (it's great!).
The upstream issues got closed. It is referenced in:
This issue was created by the ORY Closed Reference Notifier GitHub action.
The upstream pull got closed. It is referenced in:
This issue was created by the ORY Closed Reference Notifier GitHub action.
Describe the bug
I am trying to upgrade all fosite dependencies using go get -u
but it fails
To Reproduce
go get -u ./...
Expected behavior
Dependencies get upgraded.
Expected behavior
I get the following error:
/home/mitar/go/pkg/mod/github.com/ory/[email protected]/logrusx/helper.go:13:2: module go.opentelemetry.io/otel@latest found (v0.11.0), but does not contain package go.opentelemetry.io/otel/plugin/httptrace
It seems go.opentelemetry.io/otel v0.5.0 was the latest version to contain that plugin.
It's missing some configuration for jaegerremote and traces are not being sent.
jaegerRemoteSampler := jaegerremote.New(
"jaegerremote",
jaegerremote.WithSamplingServerURL(samplingServerURL),
)
tracing:
service_name: ory-oathkeeper
provider: jaeger
providers:
jaeger:
sampling:
type: const
server_url: http://127.0.0.1:5778/sampling
local_agent_address: 127.0.0.1:6831
No response
No response
master
None
None
No response
Describe the bug
Currently EOF errors show up in DB traces.
To Reproduce
Steps to reproduce the behavior:
Enable tracing, view db traces, you will see a lot of:
Expected behavior
EOF should not be an opentracing error.
Solution
The fix is likely to update https://github.com/luna-duclos/instrumentedsql to the latest release which has this fixed.
See luna-duclos/instrumentedsql#23 for more information.
Describe the bug
Switch from go.opentelemetry.io/otel v0.6.0 to go.opentelemetry.io/contrib/instrumentation/net/http/httptrace/otelhttptrace v0.13.0 breaks logging in https://github.com/ory/x/blob/master/logrusx/helper.go#L84-L93
To Reproduce
Request with header
traceparent=00-b67866858ff865fb4d89725465fd2bf4-e7f3f812960b1654-01
should log "otel":{"span_id":"e7f3f812960b1654","trace_id":"b67866858ff865fb4d89725465fd2bf4"}
I tried to switch back to go.opentelemetry.io/otel v0.6.0 and then it worked.
I assume that in https://github.com/ory/x/blob/master/configx/provider.go NewKoanfFileSubKey should used such that it's possible to specify which node a config file should apply to.
Right now it seems to be dead code. If not maybe document how to use it?
Feature: c1adb0d
Read the code :)
No response
No response
Keto 0.9.0
Linux
Binary
No response
No response
The most recent release of this package [v0.0.214] has a set of broken dependencies. In the go.mod file you are using github.com/gobuffalo/pop/v5(v5.3.1). This version of gobuffalo/pop has a dependency to a accidental 2.0.x release of github.com/mattn/go-sqlite3. Please update the version of gobuffalo/pop to have one that does not use a 2.0.x release of github.com/mattn/go-sqlite3 and create a new release. Please and thank you!
When this package is used in a go module and you try to use the command go mod tidy
it will throw this error.
go: github.com/ory/[email protected] requires
github.com/gobuffalo/pop/[email protected]: github.com/gobuffalo/pop/v5(v5.3.1) depends on excluded github.com/mattn/go-sqlite3(v2.0.3+incompatible) with no newer version available
Go version 1.13.8
0.0.214
None
None
No response
Allow OPTIONS request with CORS enabled in Hydra by using
OptionsPassthrough
No response
We can only collect OTel traces via GRPC.
ory/x
only supports sending traces via HTTP.
ory/x
should accept an additional configuration allowing sending traces via GRPC
instead of HTTP
.
I have the start of the solution here: #784.
I'm happy to finish this PR if it's agreed to be the correct solution.
We can look at adding a HTTP
-> GRPC
adapter - but would be complicated as this is the only part of our infrastructure that requires this.
hydra:v2.2.0
No response
Describe the bug
When running ORY Hydra with tracing, the service usually starts but sometimes terminates with the following error:
hydra_1 | time=2020-10-14T10:21:54Z level=error msg=The provided configuration is invalid and could not be loaded. Check the output below to understand why. audience=application config_file= service_name= service_version=
hydra_1 |
hydra_1 | tracing.providers.jaeger.sampling: map[server_url:http://jaeger:5778/sampling type:const value:1]
hydra_1 | ^-- allOf failed
hydra_1 |
hydra_1 | tracing.providers.jaeger.sampling: map[server_url:http://jaeger:5778/sampling type:const value:1]
hydra_1 | ^-- valid against schemas at indexes 0 and 1
which is non-sensical as the provided values are valid against one schema only. I have also seen other values such as <nil>
for the map or values which are missing one value, e.g. map[type:const value:1]
.
To Reproduce
Steps to reproduce the behavior:
docker-compose -f quickstart.yml -f quickstart-postgres.yml -f quickstart-tracing.yml up
docker restart hydra_hydra_1
or - to get the behavior consistently: for i in 1 .. 100; do docker restart hydra_hydra_1; done
Expected behavior
Obvious ;)
Environment
No response
Golang by default binds to IPv6, which doesn't work for everybody.
It would be nice if we could specify tcp4
for:
Line 30 in 6511eb1
Ideally the parent service config can pass down an override for the IPv4 vs IPv6 binding with a default to IPv6.
I can push the PR, but I am not sure if we want to offer another function to avoid a breaking change in the interface.
func MakeListener(network string, address string, socketPermission *configx.UnixPermission) (net.Listener, error)
There is none right now.
Kratos 1.1.0
No response
The upstream pull got closed. It is referenced in:
This issue was created by the ORY Closed Reference Notifier GitHub action.
The upstream issues got closed. It is referenced in:
This issue was created by the ORY Closed Reference Notifier GitHub action.
Provide a way to configure the OTEL (for example, Jaeger) collector endpoint. Looking at the code, it seems that no configuration is passed so the library will use the default - which is localhost.
A config option, like Jaeger or Zipkin, to specify the host and port.
Not that I am aware of.
latest
No response
Describe the bug
It takes four minutes before the inner wrapped error is displayed in the logs, drastically increasing time-to-fix for connectivity failures.
hydra-7dffc66d5b-gmt64 hydra time="2019-08-05T13:54:06Z" level=info msg="Connecting with postgres://*:*@auth-postgres:5432/auth?sslcert=%2Fetc%2Fhydra%2Fpg%2Fclient-cert.pem&sslkey=%2Fetc%2Fhydra%2Fpg%2Fclient-key.pem&sslmode=verify-ca&sslrootcert=%2Fetc%2Fhydra%2Fpg%2Fserver-ca.pem"
// snip
hydra-7dffc66d5b-gmt64 hydra time="2019-08-05T13:58:26Z" level=info msg="Retrying in 5.000000 seconds..."
hydra-7dffc66d5b-gmt64 hydra time="2019-08-05T13:58:31Z" level=fatal msg="Unable to instantiate service registry." error="could not ping SQL connection: open /etc/hydra/pg/client-cert.pem: permission denied"
To Reproduce
Misconfigure the connection string for pgsql and see the above errors; not until the retry loop is terminal after ~4 minutes, do you see the actual error it failed it.
Expected behavior
I expect the inner connection failure to be printed with a warn level error log, and an error log upon terminal failure/timeout.
Environment
When using HTML chars such as <>
or other special chars, the clidoc renderer escapes them. This should not happen.
https://github.com/ory/x/tree/master/clidoc
See example: https://www.ory.sh/docs/cli/ory-identities-get
No response
No response
master
No response
No response
No response
The upstream issues got closed. It is referenced in:
This issue was created by the ORY Closed Reference Notifier GitHub action.
The upstream issues got closed. It is referenced in:
This issue was created by the ORY Closed Reference Notifier GitHub action.
The upstream pull got closed. It is referenced in:
This issue was created by the ORY Closed Reference Notifier GitHub action.
Access logs from Kubernetes' readiness and liveness probes are polluting the logs, which makes it harder to debug issues.
Relevant log output
section below.time=2021-12-29T19:39:28Z level=info msg=started handling request http_request=map[headers:map[accept:*/* connection:close user-agent:kube-probe/1.21] host:10.42.1.105:4445 method:GET path:/health/ready query:<nil> remote:10.42.x.x:38882 scheme:http]
time=2021-12-29T19:39:28Z level=info msg=started handling request http_request=map[headers:map[accept:*/* connection:close user-agent:kube-probe/1.21] host:10.42.1.105:4445 method:GET path:/health/alive query:<nil> remote:10.42.x.x:38884 scheme:http]
time=2021-12-29T19:39:28Z level=info msg=completed handling request http_request=map[headers:map[accept:*/* connection:close user-agent:kube-probe/1.21] host:10.42.1.105:4445 method:GET path:/health/alive query:<nil> remote:10.42.x.x:38884 scheme:http] http_response=map[headers:map[content-type:application/json; charset=utf-8] size:16 status:200 text_status:OK took:405.428µs]
time=2021-12-29T19:39:28Z level=info msg=completed handling request http_request=map[headers:map[accept:*/* connection:close user-agent:kube-probe/1.21] host:10.42.1.105:4445 method:GET path:/health/ready query:<nil> remote:10.42.x.x:38882 scheme:http] http_response=map[headers:map[content-type:application/json; charset=utf-8] size:16 status:200 text_status:OK took:5.90746ms]
No response
v1.10.6-sqlite
No response
Kubernetes with Helm
I believe that the endpoints used for health checks (/health/ready
and /health/alive
) should not be logged by the middleware taking care of access logs.
There is already a feature in place to enable this, and it is used to ignore the /ping
endpoint:
Line 93 in f7381ee
See comments below; it turns out there is a way to remove access logs for health endpoints (serve.public.access_logs.disable_for_health
and serve.admin.access_logs.disable_for_health
), so instead, I'll like to know if there's really any reason to not enabling these by default? Just fixing it for my project is trivial -- it's just a configuration change -- but I feel that disabling this by default might make the experience a bit simpler for devs.
Is your feature request related to a problem? Please describe.
spf13/viper has so many bugs and issues and workarounds, and we have been battling with viper for years now. It's time to just kill this thing, it is beyond hope.
Describe the solution you'd like
Use a new configuration management library. We checked the awesome-go list, here are our results.
Legend:
Describe alternatives you've considered
Die a painful death.
Additional context
cc @zepatrik
Describe the bug
Trace spans still contain SQL args as a tag even if omitargs option has been set 😢
To Reproduce
Steps to reproduce the behaviour:
Hydra consumes this package so we can use it for manual testing. Follow https://www.ory.sh/docs/hydra/hydra-debugging#alright-how-can-i-set-this-up-locally to setup tracing and make a call to Hydra. You will notice that the sql arguments are still added as a tag even though the omitargs options has been set (by default in Hydra).
Expected behaviour
Trace spans should NOT contain tags for arguments if the omitargs option has been set.
Screenshots
See issue linked below
Version:
All versions
Additional context
This is a bug in the underlying library we use to instrument our db driver with the opentracing API. See luna-duclos/instrumentedsql#10
The bug seems to have been addressed in the upstream library already. In order to fix:
• Bump version of https://github.com/luna-duclos/instrumentedsql to latest version
• Run unit tests to ensure everything is A-OK
• Bump patch version of github.com/ory/x and release
Tests using the test helpers from sqlcon
like dockertest.RunTestMySQL(t)
could be trivially paralellizable, where it not for the fact that there is no way to clean up these containers apart from the global dockertest.KillAllTestDatabases
. The problem with dockertest.KillAllTestDatabases
is that there is no good place to put it. Within a t.Cleanup
means that the tests can't run in parallel, since any cleanup purges all containers, also from other tests. This is also the case with a TestMain
, if multiple different packages rely on the dockertest
helpers.
Initial tests show that e.g. paralellizing the tests in github.com/ory/keto/internal/persistence/sql
more than halves the test duration (from 84s 33s).
There are two options, both introducing a new dockertest.RunTest{DB}(*testing.T)
variant.
Option 1: dockertest.RunTest{DB}WithCleanup(*testing.T) (dsn string, cleanupFn func())
returns an additional cleanup function that the user can pass into t.Cleanup
.
Option 2: dockertest.RunTest{DB}AndCleanup(*testing.T) (dsn string)
returns no extra value, but adds a cleanup to t.Cleanup
automatically.
Additionally, the RunTest{DB}
functions could add the t.Cleanup
call without breaking the API, but it would still change the behaviour of the API.
I would prefer either directly modifying the RunTest{DB}
functions to add t.Cleanup
or adding a new function that uses t.Cleanup
, as I assue that when you want a test database, you want it to be removed after the test. This way, all tests that use these helpers benefit from a more sound cleanup mechanism immediately.
KillAllTestDatabases
and live with the tests not running in parallel.master
No response
Describe the bug
Hey! Got stack overflow here when running some new hydra tests which unmarshal structs with *NullString
fields.
Line 59 in 37110c9
It keeps calling itself because json.Unmarshal
actually calls UnmarshalJSON
on *NullString
.
fatal error: stack overflow
runtime stack:
runtime.throw(0x5214048, 0xe)
/usr/local/Cellar/go/1.16.3/libexec/src/runtime/panic.go:1117 +0x72
runtime.newstack()
/usr/local/Cellar/go/1.16.3/libexec/src/runtime/stack.go:1069 +0x7ed
runtime.morestack()
/usr/local/Cellar/go/1.16.3/libexec/src/runtime/asm_amd64.s:458 +0x8f
goroutine 76 [running]:
runtime.heapBitsSetType(0xc0077f5550, 0xb0, 0xa8, 0x517ec20)
/usr/local/Cellar/go/1.16.3/libexec/src/runtime/mbitmap.go:815 +0xc05 fp=0xc020e00400 sp=0xc020e003f8 pc=0x401a125
runtime.mallocgc(0xa8, 0x517ec20, 0xc0006bc201, 0xc020e004d0)
/usr/local/Cellar/go/1.16.3/libexec/src/runtime/malloc.go:1096 +0x5c5 fp=0xc020e00488 sp=0xc020e00400 pc=0x4010885
runtime.newobject(0x517ec20, 0x1)
/usr/local/Cellar/go/1.16.3/libexec/src/runtime/malloc.go:1177 +0x38 fp=0xc020e004b8 sp=0xc020e00488 pc=0x4010d78
encoding/json.Unmarshal(0xc000bda240, 0x2, 0x3c0, 0x50d8980, 0xc0006bc288, 0x0, 0x50d8980)
/usr/local/Cellar/go/1.16.3/libexec/src/encoding/json/decode.go:100 +0x31 fp=0xc020e00500 sp=0xc020e004b8 pc=0x417c6f1
github.com/ory/x/sqlxx.(*NullString).UnmarshalJSON(0xc0006bc288, 0xc000bda240, 0x2, 0x3c0, 0xf1457e0, 0xc0006bc288)
/Users/stepanrakitin/go/pkg/mod/github.com/ory/[email protected]/sqlxx/types.go:59 +0x6b fp=0xc020e00560 sp=0xc020e00500 pc=0x4bb4aab
encoding/json.(*decodeState).literalStore(0xc0077f54a0, 0xc000bda240, 0x2, 0x3c0, 0x50d8980, 0xc0006bc288, 0x16, 0x0, 0x2, 0xc0077f54c8)
/usr/local/Cellar/go/1.16.3/libexec/src/encoding/json/decode.go:860 +0x2aea fp=0xc020e006f8 sp=0xc020e00560 pc=0x4183d4a
encoding/json.(*decodeState).value(0xc0077f54a0, 0x50d8980, 0xc0006bc288, 0x16, 0xc020e007a8, 0x418edcc)
/usr/local/Cellar/go/1.16.3/libexec/src/encoding/json/decode.go:384 +0x1fa fp=0xc020e00760 sp=0xc020e006f8 pc=0x417d85a
encoding/json.(*decodeState).unmarshal(0xc0077f54a0, 0x50d8980, 0xc0006bc288, 0xc0077f54c8, 0x0)
/usr/local/Cellar/go/1.16.3/libexec/src/encoding/json/decode.go:180 +0x1f4 fp=0xc020e007e8 sp=0xc020e00760 pc=0x417ce34
encoding/json.Unmarshal(0xc000bda240, 0x2, 0x3c0, 0x50d8980, 0xc0006bc288, 0x0, 0x50d8980)
/usr/local/Cellar/go/1.16.3/libexec/src/encoding/json/decode.go:107 +0x11a fp=0xc020e00830 sp=0xc020e007e8 pc=0x417c7da
github.com/ory/x/sqlxx.(*NullString).UnmarshalJSON(0xc0006bc288, 0xc000bda240, 0x2, 0x3c0, 0xf1457e0, 0xc0006bc288)
/Users/stepanrakitin/go/pkg/mod/github.com/ory/[email protected]/sqlxx/types.go:59 +0x6b fp=0xc020e00890 sp=0xc020e00830 pc=0x4bb4aab
encoding/json.(*decodeState).literalStore(0xc0077f53f0, 0xc000bda240, 0x2, 0x3c0, 0x50d8980, 0xc0006bc288, 0x16, 0x0, 0x2, 0xc0077f5418)
/usr/local/Cellar/go/1.16.3/libexec/src/encoding/json/decode.go:860 +0x2aea fp=0xc020e00a28 sp=0xc020e00890 pc=0x4183d4a
encoding/json.(*decodeState).value(0xc0077f53f0, 0x50d8980, 0xc0006bc288, 0x16, 0xc020e00ad8, 0x418edcc)
/usr/local/Cellar/go/1.16.3/libexec/src/encoding/json/decode.go:384 +0x1fa fp=0xc020e00a90 sp=0xc020e00a28 pc=0x417d85a
encoding/json.(*decodeState).unmarshal(0xc0077f53f0, 0x50d8980, 0xc0006bc288, 0xc0077f5418, 0x0)
/usr/local/Cellar/go/1.16.3/libexec/src/encoding/json/decode.go:180 +0x1f4 fp=0xc020e00b18 sp=0xc020e00a90 pc=0x417ce34
encoding/json.Unmarshal(0xc000bda240, 0x2, 0x3c0, 0x50d8980, 0xc0006bc288, 0x0, 0x50d8980)
/usr/local/Cellar/go/1.16.3/libexec/src/encoding/json/decode.go:107 +0x11a fp=0xc020e00b60 sp=0xc020e00b18 pc=0x417c7da
github.com/ory/x/sqlxx.(*NullString).UnmarshalJSON(0xc0006bc288, 0xc000bda240, 0x2, 0x3c0, 0xf1457e0, 0xc0006bc288)
/Users/stepanrakitin/go/pkg/mod/github.com/ory/[email protected]/sqlxx/types.go:59 +0x6b fp=0xc020e00bc0 sp=0xc020e00b60 pc=0x4bb4aab
encoding/json.(*decodeState).literalStore(0xc0077f5340, 0xc000bda240, 0x2, 0x3c0, 0x50d8980, 0xc0006bc288, 0x16, 0x0, 0x2, 0xc0077f5368)
/usr/local/Cellar/go/1.16.3/libexec/src/encoding/json/decode.go:860 +0x2aea fp=0xc020e00d58 sp=0xc020e00bc0 pc=0x4183d4a
encoding/json.(*decodeState).value(0xc0077f5340, 0x50d8980, 0xc0006bc288, 0x16, 0xc020e00e08, 0x418edcc)
/usr/local/Cellar/go/1.16.3/libexec/src/encoding/json/decode.go:384 +0x1fa fp=0xc020e00dc0 sp=0xc020e00d58 pc=0x417d85a
encoding/json.(*decodeState).unmarshal(0xc0077f5340, 0x50d8980, 0xc0006bc288, 0xc0077f5368, 0x0)
/usr/local/Cellar/go/1.16.3/libexec/src/encoding/json/decode.go:180 +0x1f4 fp=0xc020e00e48 sp=0xc020e00dc0 pc=0x417ce34
encoding/json.Unmarshal(0xc000bda240, 0x2, 0x3c0, 0x50d8980, 0xc0006bc288, 0x0, 0x50d8980)
/usr/local/Cellar/go/1.16.3/libexec/src/encoding/json/decode.go:107 +0x11a fp=0xc020e00e90 sp=0xc020e00e48 pc=0x417c7da
github.com/ory/x/sqlxx.(*NullString).UnmarshalJSON(0xc0006bc288, 0xc000bda240, 0x2, 0x3c0, 0xf1457e0, 0xc0006bc288)
/Users/stepanrakitin/go/pkg/mod/github.com/ory/[email protected]/sqlxx/types.go:59 +0x6b fp=0xc020e00ef0 sp=0xc020e00e90 pc=0x4bb4aab
encoding/json.(*decodeState).literalStore(0xc0077f5290, 0xc000bda240, 0x2, 0x3c0, 0x50d8980, 0xc0006bc288, 0x16, 0x0, 0x2, 0xc0077f52b8)
/usr/local/Cellar/go/1.16.3/libexec/src/encoding/json/decode.go:860 +0x2aea fp=0xc020e01088 sp=0xc020e00ef0 pc=0x4183d4a
encoding/json.(*decodeState).value(0xc0077f5290, 0x50d8980, 0xc0006bc288, 0x16, 0xc020e01138, 0x418edcc)
/usr/local/Cellar/go/1.16.3/libexec/src/encoding/json/decode.go:384 +0x1fa fp=0xc020e010f0 sp=0xc020e01088 pc=0x417d85a
encoding/json.(*decodeState).unmarshal(0xc0077f5290, 0x50d8980, 0xc0006bc288, 0xc0077f52b8, 0x0)
/usr/local/Cellar/go/1.16.3/libexec/src/encoding/json/decode.go:180 +0x1f4 fp=0xc020e01178 sp=0xc020e010f0 pc=0x417ce34
encoding/json.Unmarshal(0xc000bda240, 0x2, 0x3c0, 0x50d8980, 0xc0006bc288, 0x0, 0x50d8980)
/usr/local/Cellar/go/1.16.3/libexec/src/encoding/json/decode.go:107 +0x11a fp=0xc020e011c0 sp=0xc020e01178 pc=0x417c7da
github.com/ory/x/sqlxx.(*NullString).UnmarshalJSON(0xc0006bc288, 0xc000bda240, 0x2, 0x3c0, 0xf1457e0, 0xc0006bc288)
/Users/stepanrakitin/go/pkg/mod/github.com/ory/[email protected]/sqlxx/types.go:59 +0x6b fp=0xc020e01220 sp=0xc020e011c0 pc=0x4bb4aab
encoding/json.(*decodeState).literalStore(0xc0077f51e0, 0xc000bda240, 0x2, 0x3c0, 0x50d8980, 0xc0006bc288, 0x16, 0x0, 0x2, 0xc0077f5208)
/usr/local/Cellar/go/1.16.3/libexec/src/encoding/json/decode.go:860 +0x2aea fp=0xc020e013b8 sp=0xc020e01220 pc=0x4183d4a
encoding/json.(*decodeState).value(0xc0077f51e0, 0x50d8980, 0xc0006bc288, 0x16, 0xc020e01468, 0x418edcc)
/usr/local/Cellar/go/1.16.3/libexec/src/encoding/json/decode.go:384 +0x1fa fp=0xc020e01420 sp=0xc020e013b8 pc=0x417d85a
encoding/json.(*decodeState).unmarshal(0xc0077f51e0, 0x50d8980, 0xc0006bc288, 0xc0077f5208, 0x0)
/usr/local/Cellar/go/1.16.3/libexec/src/encoding/json/decode.go:180 +0x1f4 fp=0xc020e014a8 sp=0xc020e01420 pc=0x417ce34
encoding/json.Unmarshal(0xc000bda240, 0x2, 0x3c0, 0x50d8980, 0xc0006bc288, 0x0, 0x50d8980)
/usr/local/Cellar/go/1.16.3/libexec/src/encoding/json/decode.go:107 +0x11a fp=0xc020e014f0 sp=0xc020e014a8 pc=0x417c7da
github.com/ory/x/sqlxx.(*NullString).UnmarshalJSON(0xc0006bc288, 0xc000bda240, 0x2, 0x3c0, 0xf1457e0, 0xc0006bc288)
/Users/stepanrakitin/go/pkg/mod/github.com/ory/[email protected]/sqlxx/types.go:59 +0x6b fp=0xc020e01550 sp=0xc020e014f0 pc=0x4bb4aab
encoding/json.(*decodeState).literalStore(0xc0077f5130, 0xc000bda240, 0x2, 0x3c0, 0x50d8980, 0xc0006bc288, 0x16, 0x0, 0x2, 0xc0077f5158)
/usr/local/Cellar/go/1.16.3/libexec/src/encoding/json/decode.go:860 +0x2aea fp=0xc020e016e8 sp=0xc020e01550 pc=0x4183d4a
encoding/json.(*decodeState).value(0xc0077f5130, 0x50d8980, 0xc0006bc288, 0x16, 0xc020e01798, 0x418edcc)
/usr/local/Cellar/go/1.16.3/libexec/src/encoding/json/decode.go:384 +0x1fa fp=0xc020e01750 sp=0xc020e016e8 pc=0x417d85a
encoding/json.(*decodeState).unmarshal(0xc0077f5130, 0x50d8980, 0xc0006bc288, 0xc0077f5158, 0x0)
/usr/local/Cellar/go/1.16.3/libexec/src/encoding/json/decode.go:180 +0x1f4 fp=0xc020e017d8 sp=0xc020e01750 pc=0x417ce34
encoding/json.Unmarshal(0xc000bda240, 0x2, 0x3c0, 0x50d8980, 0xc0006bc288, 0x0, 0x50d8980)
/usr/local/Cellar/go/1.16.3/libexec/src/encoding/json/decode.go:107 +0x11a fp=0xc020e01820 sp=0xc020e017d8 pc=0x417c7da
github.com/ory/x/sqlxx.(*NullString).UnmarshalJSON(0xc0006bc288, 0xc000bda240, 0x2, 0x3c0, 0xf1457e0, 0xc0006bc288)
/Users/stepanrakitin/go/pkg/mod/github.com/ory/[email protected]/sqlxx/types.go:59 +0x6b fp=0xc020e01880 sp=0xc020e01820 pc=0x4bb4aab
encoding/json.(*decodeState).literalStore(0xc0077f5080, 0xc000bda240, 0x2, 0x3c0, 0x50d8980, 0xc0006bc288, 0x16, 0x0, 0x2, 0xc0077f50a8)
/usr/local/Cellar/go/1.16.3/libexec/src/encoding/json/decode.go:860 +0x2aea fp=0xc020e01a18 sp=0xc020e01880 pc=0x4183d4a
encoding/json.(*decodeState).value(0xc0077f5080, 0x50d8980, 0xc0006bc288, 0x16, 0xc020e01ac8, 0x418edcc)
/usr/local/Cellar/go/1.16.3/libexec/src/encoding/json/decode.go:384 +0x1fa fp=0xc020e01a80 sp=0xc020e01a18 pc=0x417d85a
encoding/json.(*decodeState).unmarshal(0xc0077f5080, 0x50d8980, 0xc0006bc288, 0xc0077f50a8, 0x0)
/usr/local/Cellar/go/1.16.3/libexec/src/encoding/json/decode.go:180 +0x1f4 fp=0xc020e01b08 sp=0xc020e01a80 pc=0x417ce34
encoding/json.Unmarshal(0xc000bda240, 0x2, 0x3c0, 0x50d8980, 0xc0006bc288, 0x0, 0x50d8980)
/usr/local/Cellar/go/1.16.3/libexec/src/encoding/json/decode.go:107 +0x11a fp=0xc020e01b50 sp=0xc020e01b08 pc=0x417c7da
github.com/ory/x/sqlxx.(*NullString).UnmarshalJSON(0xc0006bc288, 0xc000bda240, 0x2, 0x3c0, 0xf1457e0, 0xc0006bc288)
/Users/stepanrakitin/go/pkg/mod/github.com/ory/[email protected]/sqlxx/types.go:59 +0x6b fp=0xc020e01bb0 sp=0xc020e01b50 pc=0x4bb4aab
encoding/json.(*decodeState).literalStore(0xc0077f4fd0, 0xc000bda240, 0x2, 0x3c0, 0x50d8980, 0xc0006bc288, 0x16, 0x0, 0x2, 0xc0077f4ff8)
/usr/local/Cellar/go/1.16.3/libexec/src/encoding/json/decode.go:860 +0x2aea fp=0xc020e01d48 sp=0xc020e01bb0 pc=0x4183d4a
encoding/json.(*decodeState).value(0xc0077f4fd0, 0x50d8980, 0xc0006bc288, 0x16, 0xc020e01df8, 0x418edcc)
/usr/local/Cellar/go/1.16.3/libexec/src/encoding/json/decode.go:384 +0x1fa fp=0xc020e01db0 sp=0xc020e01d48 pc=0x417d85a
encoding/json.(*decodeState).unmarshal(0xc0077f4fd0, 0x50d8980, 0xc0006bc288, 0xc0077f4ff8, 0x0)
/usr/local/Cellar/go/1.16.3/libexec/src/encoding/json/decode.go:180 +0x1f4 fp=0xc020e01e38 sp=0xc020e01db0 pc=0x417ce34
encoding/json.Unmarshal(0xc000bda240, 0x2, 0x3c0, 0x50d8980, 0xc0006bc288, 0x0, 0x50d8980)
/usr/local/Cellar/go/1.16.3/libexec/src/encoding/json/decode.go:107 +0x11a fp=0xc020e01e80 sp=0xc020e01e38 pc=0x417c7da
github.com/ory/x/sqlxx.(*NullString).UnmarshalJSON(0xc0006bc288, 0xc000bda240, 0x2, 0x3c0, 0xf1457e0, 0xc0006bc288)
/Users/stepanrakitin/go/pkg/mod/github.com/ory/[email protected]/sqlxx/types.go:59 +0x6b fp=0xc020e01ee0 sp=0xc020e01e80 pc=0x4bb4aab
encoding/json.(*decodeState).literalStore(0xc0077f4f20, 0xc000bda240, 0x2, 0x3c0, 0x50d8980, 0xc0006bc288, 0x16, 0x0, 0x2, 0xc0077f4f48)
/usr/local/Cellar/go/1.16.3/libexec/src/encoding/json/decode.go:860 +0x2aea fp=0xc020e02078 sp=0xc020e01ee0 pc=0x4183d4a
encoding/json.(*decodeState).value(0xc0077f4f20, 0x50d8980, 0xc0006bc288, 0x16, 0xc020e02128, 0x418edcc)
/usr/local/Cellar/go/1.16.3/libexec/src/encoding/json/decode.go:384 +0x1fa fp=0xc020e020e0 sp=0xc020e02078 pc=0x417d85a
encoding/json.(*decodeState).unmarshal(0xc0077f4f20, 0x50d8980, 0xc0006bc288, 0xc0077f4f48, 0x0)
/usr/local/Cellar/go/1.16.3/libexec/src/encoding/json/decode.go:180 +0x1f4 fp=0xc020e02168 sp=0xc020e020e0 pc=0x417ce34
encoding/json.Unmarshal(0xc000bda240, 0x2, 0x3c0, 0x50d8980, 0xc0006bc288, 0x0, 0x50d8980)
/usr/local/Cellar/go/1.16.3/libexec/src/encoding/json/decode.go:107 +0x11a fp=0xc020e021b0 sp=0xc020e02168 pc=0x417c7da
github.com/ory/x/sqlxx.(*NullString).UnmarshalJSON(0xc0006bc288, 0xc000bda240, 0x2, 0x3c0, 0xf1457e0, 0xc0006bc288)
/Users/stepanrakitin/go/pkg/mod/github.com/ory/[email protected]/sqlxx/types.go:59 +0x6b fp=0xc020e02210 sp=0xc020e021b0 pc=0x4bb4aab
encoding/json.(*decodeState).literalStore(0xc0077f4e70, 0xc000bda240, 0x2, 0x3c0, 0x50d8980, 0xc0006bc288, 0x16, 0x0, 0x2, 0xc0077f4e98)
/usr/local/Cellar/go/1.16.3/libexec/src/encoding/json/decode.go:860 +0x2aea fp=0xc020e023a8 sp=0xc020e02210 pc=0x4183d4a
encoding/json.(*decodeState).value(0xc0077f4e70, 0x50d8980, 0xc0006bc288, 0x16, 0xc020e02458, 0x418edcc)
/usr/local/Cellar/go/1.16.3/libexec/src/encoding/json/decode.go:384 +0x1fa fp=0xc020e02410 sp=0xc020e023a8 pc=0x417d85a
encoding/json.(*decodeState).unmarshal(0xc0077f4e70, 0x50d8980, 0xc0006bc288, 0xc0077f4e98, 0x0)
/usr/local/Cellar/go/1.16.3/libexec/src/encoding/json/decode.go:180 +0x1f4 fp=0xc020e02498 sp=0xc020e02410 pc=0x417ce34
encoding/json.Unmarshal(0xc000bda240, 0x2, 0x3c0, 0x50d8980, 0xc0006bc288, 0x0, 0x50d8980)
/usr/local/Cellar/go/1.16.3/libexec/src/encoding/json/decode.go:107 +0x11a fp=0xc020e024e0 sp=0xc020e02498 pc=0x417c7da
github.com/ory/x/sqlxx.(*NullString).UnmarshalJSON(0xc0006bc288, 0xc000bda240, 0x2, 0x3c0, 0xf1457e0, 0xc0006bc288)
/Users/stepanrakitin/go/pkg/mod/github.com/ory/[email protected]/sqlxx/types.go:59 +0x6b fp=0xc020e02540 sp=0xc020e024e0 pc=0x4bb4aab
encoding/json.(*decodeState).literalStore(0xc0077f4dc0, 0xc000bda240, 0x2, 0x3c0, 0x50d8980, 0xc0006bc288, 0x16, 0x0, 0x2, 0xc0077f4de8)
/usr/local/Cellar/go/1.16.3/libexec/src/encoding/json/decode.go:860 +0x2aea fp=0xc020e026d8 sp=0xc020e02540 pc=0x4183d4a
encoding/json.(*decodeState).value(0xc0077f4dc0, 0x50d8980, 0xc0006bc288, 0x16, 0xc020e02788, 0x418edcc)
/usr/local/Cellar/go/1.16.3/libexec/src/encoding/json/decode.go:384 +0x1fa fp=0xc020e02740 sp=0xc020e026d8 pc=0x417d85a
encoding/json.(*decodeState).unmarshal(0xc0077f4dc0, 0x50d8980, 0xc0006bc288, 0xc0077f4de8, 0x0)
/usr/local/Cellar/go/1.16.3/libexec/src/encoding/json/decode.go:180 +0x1f4 fp=0xc020e027c8 sp=0xc020e02740 pc=0x417ce34
encoding/json.Unmarshal(0xc000bda240, 0x2, 0x3c0, 0x50d8980, 0xc0006bc288, 0x0, 0x50d8980)
/usr/local/Cellar/go/1.16.3/libexec/src/encoding/json/decode.go:107 +0x11a fp=0xc020e02810 sp=0xc020e027c8 pc=0x417c7da
github.com/ory/x/sqlxx.(*NullString).UnmarshalJSON(0xc0006bc288, 0xc000bda240, 0x2, 0x3c0, 0xf1457e0, 0xc0006bc288)
/Users/stepanrakitin/go/pkg/mod/github.com/ory/[email protected]/sqlxx/types.go:59 +0x6b fp=0xc020e02870 sp=0xc020e02810 pc=0x4bb4aab
encoding/json.(*decodeState).literalStore(0xc0077f4d10, 0xc000bda240, 0x2, 0x3c0, 0x50d8980, 0xc0006bc288, 0x16, 0x0, 0x2, 0xc0077f4d38)
/usr/local/Cellar/go/1.16.3/libexec/src/encoding/json/decode.go:860 +0x2aea fp=0xc020e02a08 sp=0xc020e02870 pc=0x4183d4a
encoding/json.(*decodeState).value(0xc0077f4d10, 0x50d8980, 0xc0006bc288, 0x16, 0xc020e02ab8, 0x418edcc)
/usr/local/Cellar/go/1.16.3/libexec/src/encoding/json/decode.go:384 +0x1fa fp=0xc020e02a70 sp=0xc020e02a08 pc=0x417d85a
encoding/json.(*decodeState).unmarshal(0xc0077f4d10, 0x50d8980, 0xc0006bc288, 0xc0077f4d38, 0x0)
/usr/local/Cellar/go/1.16.3/libexec/src/encoding/json/decode.go:180 +0x1f4 fp=0xc020e02af8 sp=0xc020e02a70 pc=0x417ce34
encoding/json.Unmarshal(0xc000bda240, 0x2, 0x3c0, 0x50d8980, 0xc0006bc288, 0x0, 0x50d8980)
/usr/local/Cellar/go/1.16.3/libexec/src/encoding/json/decode.go:107 +0x11a fp=0xc020e02b40 sp=0xc020e02af8 pc=0x417c7da
github.com/ory/x/sqlxx.(*NullString).UnmarshalJSON(0xc0006bc288, 0xc000bda240, 0x2, 0x3c0, 0xf1457e0, 0xc0006bc288)
/Users/stepanrakitin/go/pkg/mod/github.com/ory/[email protected]/sqlxx/types.go:59 +0x6b fp=0xc020e02ba0 sp=0xc020e02b40 pc=0x4bb4aab
encoding/json.(*decodeState).literalStore(0xc0077f4c60, 0xc000bda240, 0x2, 0x3c0, 0x50d8980, 0xc0006bc288, 0x16, 0x0, 0x2, 0xc0077f4c88)
/usr/local/Cellar/go/1.16.3/libexec/src/encoding/json/decode.go:860 +0x2aea fp=0xc020e02d38 sp=0xc020e02ba0 pc=0x4183d4a
encoding/json.(*decodeState).value(0xc0077f4c60, 0x50d8980, 0xc0006bc288, 0x16, 0xc020e02de8, 0x418edcc)
/usr/local/Cellar/go/1.16.3/libexec/src/encoding/json/decode.go:384 +0x1fa fp=0xc020e02da0 sp=0xc020e02d38 pc=0x417d85a
encoding/json.(*decodeState).unmarshal(0xc0077f4c60, 0x50d8980, 0xc0006bc288, 0xc0077f4c88, 0x0)
/usr/local/Cellar/go/1.16.3/libexec/src/encoding/json/decode.go:180 +0x1f4 fp=0xc020e02e28 sp=0xc020e02da0 pc=0x417ce34
encoding/json.Unmarshal(0xc000bda240, 0x2, 0x3c0, 0x50d8980, 0xc0006bc288, 0x0, 0x50d8980)
/usr/local/Cellar/go/1.16.3/libexec/src/encoding/json/decode.go:107 +0x11a fp=0xc020e02e70 sp=0xc020e02e28 pc=0x417c7da
github.com/ory/x/sqlxx.(*NullString).UnmarshalJSON(0xc0006bc288, 0xc000bda240, 0x2, 0x3c0, 0xf1457e0, 0xc0006bc288)
/Users/stepanrakitin/go/pkg/mod/github.com/ory/[email protected]/sqlxx/types.go:59 +0x6b fp=0xc020e02ed0 sp=0xc020e02e70 pc=0x4bb4aab
encoding/json.(*decodeState).literalStore(0xc0077f4bb0, 0xc000bda240, 0x2, 0x3c0, 0x50d8980, 0xc0006bc288, 0x16, 0x0, 0x2, 0xc0077f4bd8)
/usr/local/Cellar/go/1.16.3/libexec/src/encoding/json/decode.go:860 +0x2aea fp=0xc020e03068 sp=0xc020e02ed0 pc=0x4183d4a
encoding/json.(*decodeState).value(0xc0077f4bb0, 0x50d8980, 0xc0006bc288, 0x16, 0xc020e03118, 0x418edcc)
/usr/local/Cellar/go/1.16.3/libexec/src/encoding/json/decode.go:384 +0x1fa fp=0xc020e030d0 sp=0xc020e03068 pc=0x417d85a
encoding/json.(*decodeState).unmarshal(0xc0077f4bb0, 0x50d8980, 0xc0006bc288, 0xc0077f4bd8, 0x0)
/usr/local/Cellar/go/1.16.3/libexec/src/encoding/json/decode.go:180 +0x1f4 fp=0xc020e03158 sp=0xc020e030d0 pc=0x417ce34
encoding/json.Unmarshal(0xc000bda240, 0x2, 0x3c0, 0x50d8980, 0xc0006bc288, 0x0, 0x50d8980)
/usr/local/Cellar/go/1.16.3/libexec/src/encoding/json/decode.go:107 +0x11a fp=0xc020e031a0 sp=0xc020e03158 pc=0x417c7da
github.com/ory/x/sqlxx.(*NullString).UnmarshalJSON(0xc0006bc288, 0xc000bda240, 0x2, 0x3c0, 0xf1457e0, 0xc0006bc288)
/Users/stepanrakitin/go/pkg/mod/github.com/ory/[email protected]/sqlxx/types.go:59 +0x6b fp=0xc020e03200 sp=0xc020e031a0 pc=0x4bb4aab
encoding/json.(*decodeState).literalStore(0xc0077f4b00, 0xc000bda240, 0x2, 0x3c0, 0x50d8980, 0xc0006bc288, 0x16, 0x0, 0x2, 0xc0077f4b28)
/usr/local/Cellar/go/1.16.3/libexec/src/encoding/json/decode.go:860 +0x2aea fp=0xc020e03398 sp=0xc020e03200 pc=0x4183d4a
encoding/json.(*decodeState).value(0xc0077f4b00, 0x50d8980, 0xc0006bc288, 0x16, 0xc020e03448, 0x418edcc)
/usr/local/Cellar/go/1.16.3/libexec/src/encoding/json/decode.go:384 +0x1fa fp=0xc020e03400 sp=0xc020e03398 pc=0x417d85a
encoding/json.(*decodeState).unmarshal(0xc0077f4b00, 0x50d8980, 0xc0006bc288, 0xc0077f4b28, 0x0)
/usr/local/Cellar/go/1.16.3/libexec/src/encoding/json/decode.go:180 +0x1f4 fp=0xc020e03488 sp=0xc020e03400 pc=0x417ce34
encoding/json.Unmarshal(0xc000bda240, 0x2, 0x3c0, 0x50d8980, 0xc0006bc288, 0x0, 0x50d8980)
/usr/local/Cellar/go/1.16.3/libexec/src/encoding/json/decode.go:107 +0x11a fp=0xc020e034d0 sp=0xc020e03488 pc=0x417c7da
github.com/ory/x/sqlxx.(*NullString).UnmarshalJSON(0xc0006bc288, 0xc000bda240, 0x2, 0x3c0, 0xf1457e0, 0xc0006bc288)
/Users/stepanrakitin/go/pkg/mod/github.com/ory/[email protected]/sqlxx/types.go:59 +0x6b fp=0xc020e03530 sp=0xc020e034d0 pc=0x4bb4aab
encoding/json.(*decodeState).literalStore(0xc0077f4a50, 0xc000bda240, 0x2, 0x3c0, 0x50d8980, 0xc0006bc288, 0x16, 0x0, 0x2, 0xc0077f4a78)
/usr/local/Cellar/go/1.16.3/libexec/src/encoding/json/decode.go:860 +0x2aea fp=0xc020e036c8 sp=0xc020e03530 pc=0x4183d4a
encoding/json.(*decodeState).value(0xc0077f4a50, 0x50d8980, 0xc0006bc288, 0x16, 0xc020e03778, 0x418edcc)
/usr/local/Cellar/go/1.16.3/libexec/src/encoding/json/decode.go:384 +0x1fa fp=0xc020e03730 sp=0xc020e036c8 pc=0x417d85a
encoding/json.(*decodeState).unmarshal(0xc0077f4a50, 0x50d8980, 0xc0006bc288, 0xc0077f4a78, 0x0)
/usr/local/Cellar/go/1.16.3/libexec/src/encoding/json/decode.go:180 +0x1f4 fp=0xc020e037b8 sp=0xc020e03730 pc=0x417ce34
encoding/json.Unmarshal(0xc000bda240, 0x2, 0x3c0, 0x50d8980, 0xc0006bc288, 0x0, 0x50d8980)
/usr/local/Cellar/go/1.16.3/libexec/src/encoding/json/decode.go:107 +0x11a fp=0xc020e03800 sp=0xc020e037b8 pc=0x417c7da
github.com/ory/x/sqlxx.(*NullString).UnmarshalJSON(0xc0006bc288, 0xc000bda240, 0x2, 0x3c0, 0xf1457e0, 0xc0006bc288)
/Users/stepanrakitin/go/pkg/mod/github.com/ory/[email protected]/sqlxx/types.go:59 +0x6b fp=0xc020e03860 sp=0xc020e03800 pc=0x4bb4aab
encoding/json.(*decodeState).literalStore(0xc0077f49a0, 0xc000bda240, 0x2, 0x3c0, 0x50d8980, 0xc0006bc288, 0x16, 0x0, 0x2, 0xc0077f49c8)
/usr/local/Cellar/go/1.16.3/libexec/src/encoding/json/decode.go:860 +0x2aea fp=0xc020e039f8 sp=0xc020e03860 pc=0x4183d4a
encoding/json.(*decodeState).value(0xc0077f49a0, 0x50d8980, 0xc0006bc288, 0x16, 0xc020e03aa8, 0x418edcc)
/usr/local/Cellar/go/1.16.3/libexec/src/encoding/json/decode.go:384 +0x1fa fp=0xc020e03a60 sp=0xc020e039f8 pc=0x417d85a
encoding/json.(*decodeState).unmarshal(0xc0077f49a0, 0x50d8980, 0xc0006bc288, 0xc0077f49c8, 0x0)
/usr/local/Cellar/go/1.16.3/libexec/src/encoding/json/decode.go:180 +0x1f4 fp=0xc020e03ae8 sp=0xc020e03a60 pc=0x417ce34
encoding/json.Unmarshal(0xc000bda240, 0x2, 0x3c0, 0x50d8980, 0xc0006bc288, 0x0, 0x50d8980)
/usr/local/Cellar/go/1.16.3/libexec/src/encoding/json/decode.go:107 +0x11a fp=0xc020e03b30 sp=0xc020e03ae8 pc=0x417c7da
github.com/ory/x/sqlxx.(*NullString).UnmarshalJSON(0xc0006bc288, 0xc000bda240, 0x2, 0x3c0, 0xf1457e0, 0xc0006bc288)
/Users/stepanrakitin/go/pkg/mod/github.com/ory/[email protected]/sqlxx/types.go:59 +0x6b fp=0xc020e03b90 sp=0xc020e03b30 pc=0x4bb4aab
encoding/json.(*decodeState).literalStore(0xc0077f48f0, 0xc000bda240, 0x2, 0x3c0, 0x50d8980, 0xc0006bc288, 0x16, 0x0, 0x2, 0xc0077f4918)
/usr/local/Cellar/go/1.16.3/libexec/src/encoding/json/decode.go:860 +0x2aea fp=0xc020e03d28 sp=0xc020e03b90 pc=0x4183d4a
encoding/json.(*decodeState).value(0xc0077f48f0, 0x50d8980, 0xc0006bc288, 0x16, 0xc020e03dd8, 0x418edcc)
/usr/local/Cellar/go/1.16.3/libexec/src/encoding/json/decode.go:384 +0x1fa fp=0xc020e03d90 sp=0xc020e03d28 pc=0x417d85a
encoding/json.(*decodeState).unmarshal(0xc0077f48f0, 0x50d8980, 0xc0006bc288, 0xc0077f4918, 0x0)
/usr/local/Cellar/go/1.16.3/libexec/src/encoding/json/decode.go:180 +0x1f4 fp=0xc020e03e18 sp=0xc020e03d90 pc=0x417ce34
encoding/json.Unmarshal(0xc000bda240, 0x2, 0x3c0, 0x50d8980, 0xc0006bc288, 0x0, 0x50d8980)
/usr/local/Cellar/go/1.16.3/libexec/src/encoding/json/decode.go:107 +0x11a fp=0xc020e03e60 sp=0xc020e03e18 pc=0x417c7da
github.com/ory/x/sqlxx.(*NullString).UnmarshalJSON(0xc0006bc288, 0xc000bda240, 0x2, 0x3c0, 0xf1457e0, 0xc0006bc288)
/Users/stepanrakitin/go/pkg/mod/github.com/ory/[email protected]/sqlxx/types.go:59 +0x6b fp=0xc020e03ec0 sp=0xc020e03e60 pc=0x4bb4aab
encoding/json.(*decodeState).literalStore(0xc0077f4840, 0xc000bda240, 0x2, 0x3c0, 0x50d8980, 0xc0006bc288, 0x16, 0x0, 0x2, 0xc0077f4868)
/usr/local/Cellar/go/1.16.3/libexec/src/encoding/json/decode.go:860 +0x2aea fp=0xc020e04058 sp=0xc020e03ec0 pc=0x4183d4a
encoding/json.(*decodeState).value(0xc0077f4840, 0x50d8980, 0xc0006bc288, 0x16, 0xc020e04108, 0x418edcc)
/usr/local/Cellar/go/1.16.3/libexec/src/encoding/json/decode.go:384 +0x1fa fp=0xc020e040c0 sp=0xc020e04058 pc=0x417d85a
encoding/json.(*decodeState).unmarshal(0xc0077f4840, 0x50d8980, 0xc0006bc288, 0xc0077f4868, 0x0)
/usr/local/Cellar/go/1.16.3/libexec/src/encoding/json/decode.go:180 +0x1f4 fp=0xc020e04148 sp=0xc020e040c0 pc=0x417ce34
encoding/json.Unmarshal(0xc000bda240, 0x2, 0x3c0, 0x50d8980, 0xc0006bc288, 0x0, 0x50d8980)
/usr/local/Cellar/go/1.16.3/libexec/src/encoding/json/decode.go:107 +0x11a fp=0xc020e04190 sp=0xc020e04148 pc=0x417c7da
github.com/ory/x/sqlxx.(*NullString).UnmarshalJSON(0xc0006bc288, 0xc000bda240, 0x2, 0x3c0, 0xf1457e0, 0xc0006bc288)
/Users/stepanrakitin/go/pkg/mod/github.com/ory/[email protected]/sqlxx/types.go:59 +0x6b fp=0xc020e041f0 sp=0xc020e04190 pc=0x4bb4aab
...additional frames elided...
created by testing.(*T).Run
/usr/local/Cellar/go/1.16.3/libexec/src/testing/testing.go:1238 +0x2b3
To Reproduce
Expected behavior
It unmarshals *NullString
same way as *string
.
Environment
v0.0.224 & v0.0.231
Is your feature request related to a problem? Please describe.
We have several services that have introduced changes to their APIs in the past. ORY Hydra has a long-standing issue on introducing the need for HTTP API versioning ( ory/hydra#1050 ).
Describe the solution you'd like
I think the best solution would be to use the Accept
HTTP Header (and fall back to ?v=
Query Parameter) based on the product name, so for example:
application/vnd.hydra.ory.sh.v1.2.3+json
There should be a few "migration" helpers:
client
to client_id
, the transformer would properly change the field). A pretty dumb version of this concept is implemented in ORY Oathkeeper.Describe alternatives you've considered
Alternatives would include path-based versioning, date-based versioning, or a custom header for versioning.
Additional context
Here's some libraries and articles that could help with approaching this:
No response
Ory/Hydra is using config schema from https://github.com/ory/x/blob/master/otelx/config.schema.json
However configuration related to elastic apm is missing in config.schema.json.
As per documentation and PR ory/hydra supports elastic apm for tracing but I am getting below error when I configured
hydra-1 exited with code 255
hydra-1 |
hydra-1 | The configuration contains values or keys which are invalid:
hydra-1 | tracing: map[provider:elastic-apm]
hydra-1 | ^-- doesn't validate with "ory://tracing-config#"
hydra-1 |
hydra-1 | The configuration contains values or keys which are invalid:
hydra-1 | tracing.provider: elastic-apm
hydra-1 | ^-- value must be one of "jaeger", "otel", "zipkin"
hydra-1 |
hydra-1 | time=2024-03-05T10:35:45Z level=error msg=Unable to instantiate configuration. audience=application error=map[message:I[#/tracing] S[#/properties/tracing/$ref] doesn't validate with "ory://tracing-config#"
hydra-1 | I[#/tracing/provider] S[#/properties/provider/enum] value must be one of "jaeger", "otel", "zipkin"] service_name=Ory Hydra service_version=v2.2.0
hydra-1 | Error: I[#/tracing] S[#/properties/tracing/$ref] doesn't validate with "ory://tracing-config#"
hydra-1 | I[#/tracing/provider] S[#/properties/provider/enum] value must be one of "jaeger", "otel", "zipkin"
hydra-1 | I[#/tracing] S[#/properties/tracing/$ref] doesn't validate with "ory://tracing-config#"
hydra-1 | I[#/tracing/provider] S[#/properties/provider/enum] value must be one of "jaeger", "otel", "zipkin"
hydra-1 | Usage:
hydra-1 | hydra serve all [flags]
hydra-1 |
No response
No response
2.2.0
macOS
Docker Compose
No response
It would be nice if logurusx default json format would return the timestamp with a higher precision. We've been having some issues with debugging since the logs are reported at the same second. It's impossible to set the precision in kratos : ory/kratos#2827 .
The minimal change here would be to set TimestampFormat: time.RFC3339Nano
in logrousx.setFormatter
I don't see any
0.10 + some individual patches
No response
Is your feature request related to a problem? Please describe.
It would be useful to be able to link requests between services.
Describe the solution you'd like
the openTracing.Tracer
interface has an Inject method for this purpose, it could be available in tracing.Tracer
.
I made a poc on oathkeeper and it works fine
I have trouble setting up tracing in keto, kratos and oathkeeper, and I couldn't find a solution. I configured tracing in each of them, the same way.
In their respective configuration files, I added the following tracing configuration:
tracing:
service_name: Ory Keto
providers:
zipkin:
server_url: http://tempo:9411/api/v2/spans
provider: zipkin
I confirmed that http://tempo:9411/api/v2/spans is able to receive zipkin spans, and that they show up in grafana. But the ory services seem not to pick up this url. For example, in the ory keto logs I can see the following:
09T13:10:12Z level=info msg=Zipkin tracer configured! Sending spans to func=github.com/ory/x/logrusx.(*Logger).Logf file=/go/pkg/mod/github.com/ory/[email protected]/logrusx/helper.go:118 audience=application service_name=Ory Keto service_version=v0.9.0-alpha.0
It seems like the "server_url" is parsed as an empty string. Because of that, the ory services don't send their own spans.
The ory services seem to correctly pick up the trace context from the incoming requests headers, but they don't send spans to the zipkin url. Example of this is in the picture
.
Use the provided tracing config
09T13:10:12Z level=info msg=Zipkin tracer configured! Sending spans to func=github.com/ory/x/logrusx.(*Logger).Logf file=/go/pkg/mod/github.com/ory/[email protected]/logrusx/helper.go:118 audience=application service_name=Ory Keto service_version=v0.9.0-alpha.0
tracing:
service_name: Ory Keto
providers:
zipkin:
server_url: http://tempo:9411/api/v2/spans
provider: zipkin
server_url: "http://tempo:9411/api/v2/spans"
is not working either
0.0.451
Linux
Docker Compose
No response
We use Instana as APM and need a first class integration with this product for tracing purposes. By first class I mean having instana directly supported and not being forced to use workarounds.
Describe the solution you'd like
Add instana as tracer to tracing/tracer.go
The upstream issues got closed. It is referenced in:
This issue was created by the ORY Closed Reference Notifier GitHub action.
The upstream issues got closed. It is referenced in:
This issue was created by the ORY Closed Reference Notifier GitHub action.
Describe the bug
Especially the array type looks for the type of it's items. If those are a reference it should use that reference to guess the type further.
To Reproduce
Steps to reproduce the behavior:
schema.json
{
"$schema": "http://json-schema.org/draft-07/schema#",
"definitions": {
"foo": {
"type": "string",
"enum": [
"bar",
"baz"
]
}
},
"properties": {
"fooArray": {
"type": "array",
"items": {
"$ref": "#/definitions/foo"
}
}
}
}
paths, _ := jsonschemax.ListPaths(schemaRef, nil)
assert.Equal(t, []interface{}{}, paths[0].Type)
Expected behavior
paths, _ := jsonschemax.ListPaths(schemaRef, nil)
assert.Equal(t, []string{}, paths[0].Type)
Currently all Ory components expose 2 main health endpoints: /ready
and /alive
. Their naming convention corresponds, and is used in k8s probes: readinessProbe and livenessProbes, which causes an issue, as what the endpoints return is actually different:
/ready
endpoint:// Check readiness status
//
// This endpoint returns a 200 status code when the HTTP server is up running and the environment dependencies (e.g.
// the database) are responsive as well.
alive
endpoint:// Check alive status
//
// This endpoint returns a 200 status code when the HTTP server is up running.
// This status does currently not include checks whether the database connection is working.
The endpoints correspond better to the probes, or are more flexible (by adding more specific endpoints like /health/ready/db
and follow the pattern:
/alive - responds with error when the applications is in a state that would require it to be restarted (dropped connection to db, which cannot be reestablished, some fatal error occurred)
/ready - responds with error, when the application is not ready to serve requests yet (migration is not ready, some other pre-requisite has not yet occurred). This check should suggest that the application is starting up, and should not yet serve clients, but it is not an error state that would require it to be restarted.
Creating custom logic on application management level which would allow for the described solution, but without modifying the applications itself . Imho we should do it in the source code itself
current
No response
The upstream issues got closed. It is referenced in:
This issue was created by the ORY Closed Reference Notifier GitHub action.
The functions to get a value from the provider, for example, provider.StringF(key, fallback)
already lock the provider for reading:
https://github.com/ory/x/blob/master/configx/provider.go#L357-L366
However, calling provider.String(key)
directly calls the embedded *koanf.Koanf
, so the provider is not locked for reading.
Use provider.String()
and provider.Set
concurrently, run with race detection.
Example: https://github.com/ory/keto/actions/runs/3994964134/jobs/6853285780#step:4:1447
==================
WARNING: DATA RACE
Write at 0x00c0006a3558 by goroutine 6410:
github.com/ory/x/configx.(*Provider).replaceKoanf()
/home/runner/go/pkg/mod/github.com/ory/[email protected]/configx/provider.go:205 +0x4b7
github.com/ory/x/configx.(*Provider).Set()
/home/runner/go/pkg/mod/github.com/ory/[email protected]/configx/provider.go:331 +0x49b
github.com/ory/keto/internal/driver/config.(*Config).Set()
/home/runner/work/keto/keto/internal/driver/config/provider.go:157 +0x67
github.com/ory/keto/internal/e2e.(*namespaceTestManager).add()
/home/runner/work/keto/keto/internal/e2e/helpers.go:39 +0x211
github.com/ory/keto/internal/e2e.runTransactionCases.func1.1()
/home/runner/work/keto/keto/internal/e2e/transaction_cases_test.go:23 +0x1a4
testing.tRunner()
/opt/hostedtoolcache/go/1.19.5/x64/src/testing/testing.go:[1446](https://github.com/ory/keto/actions/runs/3994964134/jobs/6853285780#step:4:1447) +0x216
testing.(*T).Run.func1()
/opt/hostedtoolcache/go/1.19.5/x64/src/testing/testing.go:1493 +0x47
Previous read at 0x00c0006a3558 by goroutine 6425:
github.com/ory/keto/internal/driver/config.(*Config).addressFor()
/home/runner/work/keto/keto/internal/driver/config/provider.go:170 +0x7a
github.com/ory/keto/internal/driver/config.(*Config).MetricsListenOn()
/home/runner/work/keto/keto/internal/driver/config/provider.go:177 +0x99
github.com/ory/keto/internal/e2e.Test.func1.2.2()
/home/runner/work/keto/keto/internal/e2e/full_suit_test.go:123 +0x6c
testing.tRunner()
/opt/hostedtoolcache/go/1.19.5/x64/src/testing/testing.go:1446 +0x216
testing.(*T).Run.func1()
/opt/hostedtoolcache/go/1.19.5/x64/src/testing/testing.go:1493 +0x47
Goroutine 6410 (running) created at:
testing.(*T).Run()
/opt/hostedtoolcache/go/1.19.5/x64/src/testing/testing.go:1493 +0x75d
github.com/ory/keto/internal/e2e.runTransactionCases.func1()
/home/runner/work/keto/keto/internal/e2e/transaction_cases_test.go:21 +0x10e
testing.tRunner()
/opt/hostedtoolcache/go/1.19.5/x64/src/testing/testing.go:1446 +0x216
testing.(*T).Run.func1()
/opt/hostedtoolcache/go/1.19.5/x64/src/testing/testing.go:1493 +0x47
Goroutine 6425 (finished) created at:
testing.(*T).Run()
/opt/hostedtoolcache/go/1.19.5/x64/src/testing/testing.go:1493 +0x75d
github.com/ory/keto/internal/e2e.Test.func1.2()
/home/runner/work/keto/keto/internal/e2e/full_suit_test.go:121 +0x2c4
testing.tRunner()
/opt/hostedtoolcache/go/1.19.5/x64/src/testing/testing.go:1446 +0x216
testing.(*T).Run.func1()
/opt/hostedtoolcache/go/1.19.5/x64/src/testing/testing.go:1493 +0x47
==================
No response
master
Linux
None
No response
Describe the bug
We don't parse map values from environmental variables until now. Someone will come and complain about that at some point.
Expected behavior
I guess we should use some proper format for that, let's investigate if e.g. kubernetes defines some.
The keysetpagination package does not have the option to set the X-Total-Count
header. The information needs to be added to the package.
More bug fixes have been made in upstream package - diff between current & upstream:master
👀 @aeneasr
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.