granted
granted copied to clipboard
CustomSSOBrowserPath not working for Safari
The problem is caused because we need to shell out to open -a Safari <url>
to launch Safari
the custom SSO setting instead is calling /Applications/Safari.app/Contents/MacOS/Safari <url>
which is causing the local file window to appear.
Current workaround:
- Create a file called
launch-safari.sh
in~/.granted
(doesn’t really matter where you put it) - The file should contain
#!/bin/bash
open -a Safari $1
- Run
chmod +x launch-safari.sh
to make the file executable - Set the CustomSSOBrowserPath = "/Users/Username/.granted/launch-safari.sh" (Or the path of where you placed the file)
Long term we want to shift towards a templated command approach, e.g. CustomSSOCommandTemplate = "open -a Safari {{ .URL }}"
Place to get started in the code base: https://github.com/common-fate/granted/blob/4f24b96a8de140ea3748568c779081cace61ba04/pkg/cfaws/assumer_aws_sso.go#L290-L295