breezy-rocket-65852
12/08/2023, 10:25 AMflat-rose-25983
12/07/2023, 3:10 PMStarting PostgreSQL **
2023-12-07 14:56:37.602 GMT [1] LOG: pgaudit extension initialized
2023-12-07 14:56:37.610 GMT [1] LOG: starting PostgreSQL 14.4 on x86_64-pc-linux-gnu, compiled by gcc (Debian 10.2.1-6) 10.2.1 20210110, 64-bit
2023-12-07 14:56:37.610 GMT [1] LOG: listening on IPv4 address "0.0.0.0", port 5432
2023-12-07 14:56:37.610 GMT [1] LOG: listening on IPv6 address "::", port 5432
2023-12-07 14:56:37.619 GMT [1] LOG: listening on Unix socket "/tmp/.s.PGSQL.5432"
2023-12-07 14:56:37.625 GMT [131] LOG: database system was shut down at 2023-12-07 14:56:37 GMT
2023-12-07 14:56:37.634 GMT [1] LOG: database system is ready to accept connections
2023-12-07 14:56:46.323 GMT [145] FATAL: database "identity" does not exist
2023-12-07 14:56:46.556 GMT [146] FATAL: database "identity" does not exist
2023-12-07 14:56:55.601 GMT [154] FATAL: database "identity" does not exist
2023-12-07 14:56:56.104 GMT [155] FATAL: database "identity" does not exist
2023-12-07 14:57:17.114 GMT [184] FATAL: database "identity" does not exist
Kratos logs:
kubectl logs kratos-86f7b57998-fxwwx -c kratos-automigrate -n auth-default
time=2023-12-07T15:06:57Z level=info msg=No tracer configured - skipping tracing setup audience=application service_name=Ory Kratos service_version=v1.0.0
time=2023-12-07T15:06:57Z level=debug msg=Connecting to SQL Database audience=application connMaxLifetime=0s idlePool=2 pool=4 service_name=Ory Kratos service_version=v1.0.0
time=2023-12-07T15:06:58Z level=warning msg=Unable to ping database, retrying. audience=application error=map[message:failed to connect to `host=postgres user=postgres database=identity`: server error (FATAL: database "identity" does not exist (SQLSTATE 3D000)) stack_trace:
<http://github.com/ory/kratos/persistence/sql.(*Persister).Ping|github.com/ory/kratos/persistence/sql.(*Persister).Ping>
astonishing-morning-18498
12/05/2023, 8:34 PMbefore
hooks return 500?astonishing-morning-18498
12/05/2023, 5:47 PMExpected WebAuthN in internal context to be an object
Details in threadastonishing-morning-18498
12/05/2023, 4:09 PMmost-river-7586
12/05/2023, 7:36 AMgreen-gigabyte-44707
12/04/2023, 4:54 PMtall-london-16758
12/04/2023, 2:53 PMfierce-vr-9523
12/03/2023, 8:27 PMory tunnel <http://127.0.0.1:8081> --port 4001 --project <PROJECT_SLUG> --allowed-cors-origins <http://127.0.0.1:8081> --cookie-domain 127.0.0.1:8081 --dev --debug
But the CORS headers are not included in the response headers for the preflight requests:
HTTP/1.1 204 No Content
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
Date: Sun, 03 Dec 2023 20:02:53 GMT
Request headers:
OPTIONS /self-service/login/browser HTTP/1.1
Accept: */*
Accept-Encoding: gzip, deflate, br
Accept-Language: en-US,en;q=0.9
Access-Control-Request-Headers: access-control-allow-credentials
Access-Control-Request-Method: GET
Cache-Control: no-cache
Connection: keep-alive
Host: 127.0.0.1:4001
Origin: <http://localhost:8081>
Pragma: no-cache
Referer: <http://localhost:8081/>
Sec-Fetch-Dest: empty
Sec-Fetch-Mode: cors
Sec-Fetch-Site: cross-site
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/119.0.0.0 Safari/537.36
In the terminal I get the following message:
[cors] 2023/12/03 14:25:29 Handler: Preflight request
[cors] 2023/12/03 14:25:29 Preflight aborted: headers '[Access-Control-Allow-Credentials]' not allowed
I am not sure if this could be a bug or if I am missing extra configuration. For context I am using the rust client and I am adding the headers directly to the reqwst client:
let mut headers = HeaderMap::new();
headers.insert(ACCEPT, HeaderValue::from_static("application/json"));
headers.insert(ACCESS_CONTROL_ALLOW_CREDENTIALS, HeaderValue::from_static("true"));
headers.insert(ORIGIN, HeaderValue::from_static("<http://127.0.0.1:8081>"));
let client = reqwest::Client::builder().default_headers(headers).build().unwrap();
let config = Configuration {
base_path: ORY_ADMIN_URL.to_string(),
user_agent: None,
client,
basic_auth: None,
oauth_access_token: None,
bearer_access_token: None,
api_key: None,
};
most-river-7586
12/01/2023, 10:35 PM/self-service/methods/oidc/callback/:providerId
to redirect to my app's url?
It's currently redirecting to selfservice.default_browser_return_url
, which isn't ideal since I have multiple apps on separate subdomains.
Perhaps there's an extra query param that I can add to the /self-service/methods/oidc/callback
url, which will override the default_browser_return_url
?
For context, the /self-service/methods/oidc/callback
endpoint is invoked by passing it as a redirect_uri
query param to my OIDC provider's url, like so: <https://myoktalogin.example.com/oauth2/v1/authorize?client_id=${myOidcClientId}&redirect_uri=${publicKratosBaseUrl}/self-service/methods/oidc/callback/my-okta-test&response_type=code&scope=email+profile+openid&state=${state}>
I have the rest of the OIDC flow working. Now I just need to customize the final redirect. I've included some logs below which show how this endpoint is being handled on my oryd/kratos:v1.0.0
local deployment.full-book-15949
12/01/2023, 7:43 PMastonishing-morning-18498
12/01/2023, 3:31 PMafter
registration hooks. However, I can’t seem to get it to work. I’ll attach the config in the threadmost-river-7586
12/01/2023, 7:38 AMupdateLoginFlow
is returning a 422?
I'm calling it from the SDK like so, inside my SPA:
ory.createBrowserLoginFlow().then(({ data: flow }) => {
const flowId = flow.id;
ory
.updateLoginFlow({ flow: flowId, updateLoginFlowBody: { method: 'oidc', provider: 'my-okta-test' } })
.then(({ data: successRes }) => { ... })
})
but the .updateLoginFlow
call is returning a 422.
Here is the curl output of that call, which I got from my browser's networking tab:lively-family-71685
11/30/2023, 5:54 AMctx.flow.ui
but would be nice if there's any "native" way.lemon-student-13425
11/30/2023, 5:54 AMhappy-apple-8383
11/30/2023, 3:08 AMselfservice.methods.password.config.haveibeenpwned_enabled
[2023-11-30 03:05:33.335319799 +0000 UTC m=+107.237476855] gitops-debug,host: api.pwnedpasswords.com, uri: /range/4545F, req: &http.Request{Method:"GET", URL:(*url.URL)(0xc0019a3b00), Proto:"HTTP/1.1", ProtoMajor:1, ProtoMinor:1, Header:http.Header{}, Body:io.ReadCloser(nil), GetBody:(func() (io.ReadCloser, error))(nil), ContentLength:0, TransferEncoding:[]string(nil), Close:false, Host:"api.pwnedpasswords.com", Form:url.Values(nil), PostForm:url.Values(nil), MultipartForm:(*multipart.Form)(nil), Trailer:http.Header(nil), RemoteAddr:"", RequestURI:"", TLS:(*tls.ConnectionState)(nil), Cancel:(<-chan struct {})(nil), Response:(*http.Response)(nil), ctx:(*context.valueCtx)(0xc0000c6060)}
happy-apple-8383
11/30/2023, 2:09 AMtime=2023-11-30T02:07:26Z level=error msg=An error occurred while handling a request audience=application error=map[message:migrations have not yet been fully applied] http_request=map[headers:map[accept:*/* connection:close user-agent:kube-probe/1.20+] host:127.0.0.1 method:GET path:/admin/health/ready query:<nil> remote:1xx.1.1.1:57928 scheme:http] http_response=map[status_code:503] service_name=Ory Kratos service_version=master
numerous-energy-92403
11/29/2023, 7:41 PMcurved-ram-6189
11/29/2023, 2:42 PMhappy-apple-8383
11/29/2023, 9:49 AMhappy-apple-8383
11/29/2023, 9:43 AMtall-easter-67692
11/29/2023, 8:56 AMcalm-oxygen-16453
11/29/2023, 6:21 AMhappy-apple-8383
11/29/2023, 3:17 AMtime=2023-11-29T02:39:50Z level=error msg=An error occurred and is being forwarded to the error user interface. audience=application error=map[debug: message:An internal server error occurred, please contact the system administrator reason:GET <https://gitlab.xxx.com/oauth/userinfo> giving up after 3 attempt(s): Get "<https://gitlab.xxx.com/oauth/userinfo>": 1xx.x.x.x is not a public IP address status:Internal Server Error status_code:500]
kratos calls gitlab api from external ory service? or depends on any public ory service?full-book-15949
11/28/2023, 11:50 PMfull-book-15949
11/28/2023, 8:21 PMhallowed-processor-98028
11/28/2023, 7:33 PMripe-tiger-25666
11/28/2023, 2:13 PMflowId
, or messageId or similar). I looked at the webhook functionality, but unfortunately only either the recovery code or the flow id is available, depending on the hook being used.
courier.http.request_config
"hook" -> properties recipient
and recovery_code
get send, but not flowId
selfservice.flows.recovery.before.hooks
/ selfservice.flows.recovery.after.hooks
-> flowId is available, but the context of the email/recoveryCode is not existing (before) or already gone (after)
Question: is it somehow possible to enrich the data for the first general hook (courier.http.request_config
), so that the flowId is also transferred?
Context: when having both the recoveryCode and flowId at hand, I could implement a better UX together with my custom UI.
I also had a look at the Kratos Go Code (SendRecoveryCodeTo
) and adding the flowId there would be quite easy. It does not even need to be part of the EmailTemplate
's. But before creating an upstream PR I wanted to get in touch with you. Thx!kind-receptionist-82950
11/28/2023, 1:54 PMstate
(even not null)kind-receptionist-82950
11/28/2023, 12:40 PM"state": null,