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

Can't use password including double quote with service_certmapping resource #8

Open
Annih opened this issue Mar 22, 2015 · 0 comments

Comments

@Annih
Copy link
Contributor

Annih commented Mar 22, 2015

The current implementation of the service_certmapping provider is using the winrm.cmd witch calls the winrm.vbs.
This script uses a regular expression that forbids usage of double quote in inputs provided as "hash":

private const PTRN_HASH_TOK = "\s*([\w:]+)\s*=\s*(\$null|""([^""]*)"")\s*"
  • A simple but "dirty" solution is to use an XML file as winrm.cmd input.
    • PRO: It should work perfectly in all condition
    • CON: We have to "temporarily" generate an xml file on disk with plaintext password
  • A workaround is to use the former implementation when there is a double quote in the password.
  • A more complexe but "clean" solution is to manage the certmapping registry key, and manuall save the Network Service credentials.
    • PRO: do not rely on wsman; similar to listener; require only administrative access; work for all password and systems
    • CON: complexe, need to impersonate NT Authority\Network Service in another service/task

A simple workaround is to not use password with double quote :)

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

No branches or pull requests

1 participant