Skip to content

No way to reference credentials with . in their name #4249

Closed

Description

@bonzofenix

Bug Report

When using the atc vault integration for vars in ((..)) format keys with dots are ignored.

A secret at concourse/main/some.secret:key can not be read through variables. I think the regex that looks for key names should use the last dot to split the path and the key.

it would be nice if concourse realize that ((some.secret.key)) is a secret at concourse/main/some.secret:key or to have a way to escape the key ., something like ((some\.secret.key))

Regex seems to explicitly ignore paths with .s.

interpolationRegex = regexp.MustCompile(`\(\((!?[-/\.\w\pL]+)\)\)`)

Steps to Reproduce

Try to read a secret where the path contains the . character.

Version Info

  • Concourse version: 5.3.0
  • Deployment type (BOSH/Docker/binary): bosh
  • Infrastructure/IaaS: vsphere

Activity

  1. bonzofenix commented on Aug 9, 2019

    @bonzofenix
    Author
  2. vito commented on Aug 13, 2019

    @vito
    Contributor

    The complication here is that . is used in our vars notation for field access. ((foo.bar)) means "get the foo key and read the bar field from it."

  3. stale commented on Oct 12, 2019

    @stale

    Beep boop! This issue has been idle for long enough that it's time to check in and see if it's still important.

    If it is, what is blocking it? Would anyone be interested in submitting a PR or continuing the discussion to help move things forward?

    If no activity is observed within the next week, this issue will be exterminated closed, in accordance with our stale issue process.

  4. TheSecMaven commented on Jun 11, 2020

    @TheSecMaven

    this blocks any integration with conjur as well, the conjur credential manager iis effectively useless wiithout this as lots of variables have dots in them

  5. TheSecMaven commented on Jun 11, 2020

    @TheSecMaven

    see screenshot of concourse not recognizing it, this variable is supposed to be from conjur
    MicrosoftTeams-image (1)

  6. vito commented on Jun 11, 2020

    @vito
    Contributor

    @mkkeffeler Hm, do you have any docs or anything I can reference to get an idea of how common that is? Their website seems to only have examples of camelCase.

    We should have a way for this to work either way, but knowing how commonplace it is will help decide whether this should be done through some sort of escaping syntax or some alternative notation for field access.

  7. reopened this on Jun 11, 2020
  8. changed the title [-]Vault integration ignores keys with . character on them[/-] [+]No way to reference credentials with `.` in their name[/+] on Jun 11, 2020
  9. TheSecMaven commented on Jun 11, 2020

    @TheSecMaven

    see https://docs.cyberark.com/Product-Doc/OnlineHelp/AAM-DAP/Latest/en/Content/Conjur/cv_accnt-representation.htm?tocpath=Integrations%7CCyberArk%20Vault%20Synchronizer%7CAccounts%20and%20Safes%7C_____1#Namingconventionforvariables

    This is how lots of customers get credentials to conjur that are being managed by cyberark. note that part of the naming schema includes the address of the account, where address is usually a server such as myserver..

  10. vito commented on Jun 11, 2020

    @vito
    Contributor

    @mkkeffeler Got it, thanks. Do you have any suggestions/preference for syntax? What about something like (("foo.bar".baz))?

  11. TheSecMaven commented on Jun 11, 2020

    @TheSecMaven

    yeah exactly, if i double quote a variable it should process it as a whole name, where as outside of that can do the json sub attribute access or any other use cases that may be needed

  12. added a commit that references this issue on Jun 17, 2020
  13. TheSecMaven commented on Jun 25, 2020

    @TheSecMaven

    is there somewhere to track this issue at? this is a pretty big blocker for us and we would at least like to track it and help get it prioritized if possible

  14. vito commented on Jun 25, 2020

    @vito
    Contributor

    @mkkeffeler This is a good issue to follow, in addition to #5813 which is a broader issue. There's a 'Subscribe' button at the right if you're not subscribed already.

    The relevant code is here, if anyone would like to contribute the JSON string syntax change:

    var (
    interpolationRegex = regexp.MustCompile(`\(\((!?([-/\.\w\pL]+\:)?[-/\.\w\pL]+)\)\)`)
    interpolationAnchoredRegex = regexp.MustCompile("\\A" + interpolationRegex.String() + "\\z")
    )

  15. dwchurch commented on Jul 6, 2020

    @dwchurch

    this is very common in conjur to have special characters, so very helpful

  16. alogishetty commented on Jul 6, 2020

    @alogishetty

    We need this feature in concourse today for interacting with Conjur successfully!

  17. alexw19 commented on Jul 6, 2020

    @alexw19

    This integration with Conjur is very much needed as it's common for special characters to be included in Conjur.

  18. self-assigned this
    on Jul 7, 2020
  19. added this to the v6.5.0 milestone on Jul 13, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions