Rene Dekker and GitHub
9355759813
fix(storage/kubernetes): Only wrap IPv6 addresses in brackets ( #4388 )
...
The Kubernetes client code was wrapping all IP addresses (both IPv4 and
IPv6) in square brackets when constructing the API server URL. This was
based on an incorrect assumption that IPv4 addresses in brackets are valid
in a URL.
Recent versions of Go (1.25.2 and later) have stricter URL parsing
that conforms to RFC 3986. This causes a failure when running Dex in a
Kubernetes environment where the KUBERNETES_SERVICE_HOST is an IPv4
address, leading to the error "invalid IPv6 host".
This commit changes the logic to only wrap IPv6 addresses in square
brackets. It uses `ip.To4() == nil` to reliably detect if an IP address
is IPv6 before wrapping it. This ensures that URLs are correctly
formatted for both IPv4 and IPv6 addresses, fixing the incompatibility
with newer Go versions.
Signed-off-by: Rene Dekker <rene@tigera.io >
2025-11-03 10:50:25 +01:00
Maksim Nabokikh and GitHub
7e2225c0e6
Do not wrap Kubernetes Address in brackets ( #4363 )
...
Signed-off-by: maksim.nabokikh <max.nabokih@gmail.com >
2025-10-23 11:29:25 +02:00
Mark Sagi-Kazar
26accba6b1
ci: update linter
...
Signed-off-by: Mark Sagi-Kazar <mark.sagikazar@gmail.com >
2025-08-18 14:21:00 +02:00
Mark Sagi-Kazar
e230d9426d
test: use new Go features in tests
...
Signed-off-by: Mark Sagi-Kazar <mark.sagikazar@gmail.com >
2025-08-18 14:09:26 +02:00
Mark Sagi-Kazar
1b548e853d
chore: update ent generated code
...
Signed-off-by: Mark Sagi-Kazar <mark.sagikazar@gmail.com >
2025-08-18 12:53:54 +02:00
5f91d4bed5
Allow compilation without CGO ( #4266 )
...
`ent` driver gives a normal error if the binary is compiled without CGO, but with our custom SQL driver Dex just fails to compile.
```
# github.com/dexidp/dex/cmd/dex
cmd/dex/config.go:273:26: undefined: sql.SQLite3
cmd/dex/config.go:315:43: undefined: sql.SQLite3
```
Signed-off-by: Maksim Nabokikh <maksim.nabokikh@flant.com >
Signed-off-by: Maksim Nabokikh <max.nabokih@gmail.com >
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com >
2025-08-11 14:57:54 +03:00
Mark Sagi-Kazar
385e63d4d4
chore: update dependencies
...
Signed-off-by: Mark Sagi-Kazar <mark.sagikazar@gmail.com >
2025-05-19 19:22:26 +02:00
Oleksandr Redko and GitHub
9891daa585
refactor: simplify tests by using slog.DiscardHandler ( #4058 )
...
Signed-off-by: Oleksandr Redko <oleksandr.red+github@gmail.com >
2025-04-03 09:56:18 +02:00
Maksim Nabokikh and GitHub
a4449010a4
k8s storage: Request only one object to check if API exists ( #4027 )
...
Signed-off-by: maksim.nabokikh <max.nabokih@gmail.com >
2025-03-06 11:55:34 +01:00
Mark Sagi-Kazar
03e18fd446
build: add ent as a tool to go.mod
...
Signed-off-by: Mark Sagi-Kazar <mark.sagikazar@gmail.com >
2025-02-18 13:12:25 +01:00
Mark Sagi-Kazar
3ab44d6d9a
build: update ent to 0.14.2
...
Signed-off-by: Mark Sagi-Kazar <mark.sagikazar@gmail.com >
2025-02-18 13:04:48 +01:00
Bob Maertz and GitHub
ad31b5d6f7
Passing context storage ( #3941 )
...
Signed-off-by: Bob Maertz <1771054+bobmaertz@users.noreply.github.com >
2025-02-04 10:11:44 +01:00
Mark Sagi-Kazar
3f7135b902
fix: disable tls in tests
...
Signed-off-by: Mark Sagi-Kazar <mark.sagikazar@gmail.com >
2025-01-09 15:58:31 +01:00
Maksim Nabokikh and GitHub
9986b27b76
Bump ent v0.14.0 ( #3670 )
...
Signed-off-by: m.nabokikh <maksim.nabokikh@flant.com >
2024-08-02 17:44:05 +02:00
Sean Liao and GitHub
0b6a78397e
use slog for structured logging ( #3502 )
...
Signed-off-by: Sean Liao <sean+git@liao.dev >
2024-06-01 20:15:58 +04:00
Maksim Nabokikh and GitHub
347bebafad
Revert autogenerated columnChecker description ( #3528 )
...
Signed-off-by: Maksim Nabokikh <maksim.nabokikh@flant.com >
2024-05-13 21:01:05 +02:00
mountcount and GitHub
c6fa45568b
chore: fix function names in comment ( #3464 )
...
Signed-off-by: mountcount <cuimoman@outlook.com >
2024-05-13 20:33:13 +02:00
7225198ae7
Update max length of kubernetes object to fit kubernetes policy ( #3439 )
...
Signed-off-by: Denys Romanenko <65756796+RomanenkoDenys@users.noreply.github.com >
Signed-off-by: Maksim Nabokikh <max.nabokih@gmail.com >
Co-authored-by: Maksim Nabokikh <max.nabokih@gmail.com >
2024-03-28 20:58:59 +01:00
60ddd188c0
Update go-jose to v4.0.1 ( #3409 )
...
Signed-off-by: Matthias Loibl <mail@matthiasloibl.com >
Signed-off-by: Maksim Nabokikh <maksim.nabokikh@flant.com >
Signed-off-by: m.nabokikh <maksim.nabokikh@flant.com >
Co-authored-by: Matthias Loibl <mail@matthiasloibl.com >
2024-03-11 22:23:54 +01:00
Mark Sagi-Kazar
3905389510
chore: update ent
...
Signed-off-by: Mark Sagi-Kazar <mark.sagikazar@gmail.com >
2024-02-27 14:06:46 +01:00
Ferenc Fabian and GitHub
2377b0a0cd
Add context to storage's Create endpoints ( #2935 )
...
* Initial commit
Signed-off-by: PumpkinSeed <qwer.kocka@gmail.com >
* Finish the syntex fixes
Signed-off-by: PumpkinSeed <qwer.kocka@gmail.com >
* Add fixes after running the tests
Signed-off-by: PumpkinSeed <qwer.kocka@gmail.com >
* Change background context to request context
Signed-off-by: PumpkinSeed <qwer.kocka@gmail.com >
---------
Signed-off-by: PumpkinSeed <qwer.kocka@gmail.com >
2024-01-25 12:51:25 +01:00
Maksim Nabokikh and GitHub
85d4261aa9
Bump dependencies ent v0.12.5, protobuf v1.32.0 ( #3249 )
...
Signed-off-by: m.nabokikh <maksim.nabokikh@flant.com >
2023-12-28 12:44:03 +01:00
Maksim Nabokikh and GitHub
3b78752ab1
Bump ent (v0.12.4) and example app dependencies ( #3166 )
...
Signed-off-by: m.nabokikh <maksim.nabokikh@flant.com >
2023-10-20 16:45:52 +02:00
MM53 and GitHub
a2d7d8dae2
Fix etcd device requests ( #3119 )
...
Signed-off-by: MM53 <28218664+MM53@users.noreply.github.com >
2023-10-20 12:05:03 +02:00
Mark Sagi-Kazar
902f07c3d2
chore: regenerate code
...
Signed-off-by: Mark Sagi-Kazar <mark.sagikazar@gmail.com >
2023-05-12 13:09:49 -07:00