Fix 1Password domain resolution in firewall script #9
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
Fixes the firewall script's 1Password domain resolution that was broken due to IFS (Internal Field Separator) configuration.
Problem
The strict
IFS=$'\n\t'setting at the top of the script was preventing proper iteration over space-separated strings. This caused the firewall script to concatenate all 1Password subdomains and TLDs into a single string instead of iterating through them individually.Symptoms:
op whoamiworked (cached auth check)op vault listhung indefinitely (needed network access)Resolving 1password my.1password app.1password api.1password events.1password b5n.1password.com eu ca...34.199.143.37formy.1password.comwas not in the allowlistSolution
Changed from space-separated strings to bash arrays for the 1Password subdomain and TLD lists. Arrays work correctly regardless of IFS settings.
Changes
onepassword_subdomainsfrom string to arrayonepassword_tldsfrom string to array"${array[@]}"Testing
Verified that with arrays:
my.1password.comare capturedIFS=$'\n\t'Impact
This fix ensures all 1Password domains are properly resolved and their IPs added to the firewall allowlist, allowing the 1Password CLI to function correctly in the devcontainer.