Skip to content

Commit be2faef

Browse files
authored
Merge pull request #96 from OpenConext/fix/local-domain-dns-delay
fix: avoid macOS mDNS 5s delay on .local hosts entries
2 parents 2291d6f + 9723305 commit be2faef

3 files changed

Lines changed: 12 additions & 0 deletions

File tree

‎core/README.md‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,11 @@ You will also need to tell your local machine where to find the hosts.
3434
Add the following line in your hosts file (/etc/hosts):
3535
```
3636
127.0.0.1 engine.dev.openconext.local manage.dev.openconext.local profile.dev.openconext.local engine-api.dev.openconext.local mujina-idp.dev.openconext.local profile.dev.openconext.local connect.dev.openconext.local teams.dev.openconext.local voot.dev.openconext.local pdp.dev.openconext.local invite.dev.openconext.local welcome.dev.openconext.local
37+
::1 engine.dev.openconext.local manage.dev.openconext.local profile.dev.openconext.local engine-api.dev.openconext.local mujina-idp.dev.openconext.local profile.dev.openconext.local connect.dev.openconext.local teams.dev.openconext.local voot.dev.openconext.local pdp.dev.openconext.local invite.dev.openconext.local welcome.dev.openconext.local
3738
```
39+
The `::1` line matters on macOS: without a local AAAA (IPv6) record,
40+
`.local` hostname lookups fall through to multicast DNS (Bonjour),
41+
which takes ~5s to time out before falling back to /etc/hosts.
3842

3943
If all goes well, you can now login. Please see the section below to find out where you can login.
4044

‎core/scripts/init.sh‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,11 @@ printf "\n"
128128
echo -e "${BLUE}Please add the following line to your /etc/hosts: ${VINKJE}"
129129
printf "\n"
130130

131+
# The ::1 line avoids macOS's ~5s mDNS/Bonjour timeout for .local hostnames --
132+
# without a local AAAA (IPv6) record, macOS tries multicast DNS first for
133+
# every .local lookup before falling back to /etc/hosts.
131134
echo "127.0.0.1 engine.dev.openconext.local manage.dev.openconext.local profile.dev.openconext.local engine-api.dev.openconext.local mujina-idp.dev.openconext.local profile.dev.openconext.local connect.dev.openconext.local teams.dev.openconext.local voot.dev.openconext.local invite.dev.openconext.local welcome.dev.openconext.local"
135+
echo "::1 engine.dev.openconext.local manage.dev.openconext.local profile.dev.openconext.local engine-api.dev.openconext.local mujina-idp.dev.openconext.local profile.dev.openconext.local connect.dev.openconext.local teams.dev.openconext.local voot.dev.openconext.local invite.dev.openconext.local welcome.dev.openconext.local"
132136

133137
printf "\n"
134138
echo "You can now login. If you want to bring the environment down, use the command below"

‎stepup/README.md‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,11 @@ First, you need to create an entry in your hosts file (/etc/hosts on *nix system
1919

2020
```
2121
127.0.0.1 selfservice.dev.openconext.local ssp.dev.openconext.local gateway.dev.openconext.local middleware.dev.openconext.local ra.dev.openconext.local demogssp.dev.openconext.local tiqr.dev.openconext.local webauthn.dev.openconext.local azuremfa.dev.openconext.local
22+
::1 selfservice.dev.openconext.local ssp.dev.openconext.local gateway.dev.openconext.local middleware.dev.openconext.local ra.dev.openconext.local demogssp.dev.openconext.local tiqr.dev.openconext.local webauthn.dev.openconext.local azuremfa.dev.openconext.local
2223
```
24+
The `::1` line matters on macOS: without a local AAAA (IPv6) record,
25+
`.local` hostname lookups fall through to multicast DNS (Bonjour),
26+
which takes ~5s to time out before falling back to /etc/hosts.
2327

2428
Secondly you need to create the `stepup/gateway/surfnet_yubikey.yaml` file with your Yubikey API credentials.
2529
If you do not have API credentials, you can get them at <https://upgrade.yubico.com/getapikey/>.

0 commit comments

Comments
 (0)