Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Alpaca fails to get credentails from NoMAD/Keychain #32

Closed
samuong opened this issue Oct 19, 2019 · 0 comments · Fixed by #50
Closed

Alpaca fails to get credentails from NoMAD/Keychain #32

samuong opened this issue Oct 19, 2019 · 0 comments · Fixed by #50

Comments

@samuong
Copy link
Owner

samuong commented Oct 19, 2019

Even when NoMAD is installed and configured to use the system keychain, Alpaca fails to read the NoMAD configuration and get the credentials out of the keychain. It disables proxy authentication as a result:

main.go:58: NoMAD configuration key not found. Disabling proxy authentication.

When NoMAD app preferences are managed by a configuration profile which means they get written to /Library/Managed Preferences/$USER/com.trusourcelabs.NoMAD.plist. When a user then logs into NoMAD, their particular details get written to /Users/$USER/Library/Preferences/com.trusourcelabs.NoMAD.plist. In this case, UseKeychain gets defined in Managed Preferences and UserPrincipal gets defined in the user's Preferences directory.

Alpaca uses the defaults command to read the configuration, and it looks like this is only reading the plist file in the user's Preferences directory.

A workaround is to manually use defaults write to set UseKeychain to 1 in the user's plist:

defaults write com.trusourcelabs.NoMAD UseKeychain 1
segan5 pushed a commit to segan5/alpaca that referenced this issue Mar 6, 2020
…ry/Managed Preferences before reading them from ~/Library/Preferences
@camh- camh- closed this as completed in #50 Mar 8, 2020
camh- pushed a commit that referenced this issue Mar 8, 2020
Read NoMAD configuration values from /Library/Managed Preferences before 
reading them from ~/Library/Preferences.

In manual testing with split preferences, UseKeychain is now being read
from Managed Preferences plist while UserPrincipal is still being read 
from the user's preferences plist.

This will avoid users having to use that manual workaround on corporate 
managed devices that deploy a configuration profile to manage NoMAD.

Fixes: #32


Co-authored-by: Seng Ern Gan <sengern.gan@anz.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant