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

Re-init the cache on error: "{{ external.email }}" is not a valid matcher expression #4493

Closed
benarent opened this issue Oct 8, 2020 · 5 comments
Assignees
Labels
blocker Blocker for the milestone test-plan-problem Issues which have been surfaced by running the manual release test plan
Milestone

Comments

@benarent
Copy link
Contributor

benarent commented Oct 8, 2020

Description

What happened:

User has built with master and received

WARN [NODE:1:CA] Re-init the cache on error: "{{ external.email }}" is not a valid matcher expression - no variables and transformations are allowed. cache/cache.go:333
kind: role
metadata:
  name: security-user
spec:
  allow:
    logins:
    - '{{email.local(external.email)}}'

What you expected to happen:

Need to check if {{email.local(external.email)}} is working on 4.4-rc1

@benarent benarent added the test-plan-problem Issues which have been surfaced by running the manual release test plan label Oct 8, 2020
@benarent benarent added this to the 4.4 "Rome" milestone Oct 8, 2020
@benarent
Copy link
Contributor Author

benarent commented Oct 8, 2020

I tested this with Okta

INFO [AUDIT]     user.login attributes:map[email:[[email protected]] groups:[Everyone okta-admin]] code:T1001I ei:0 event:user.login method:saml success:true time:2020-10-08T21:05:45.568Z uid:b0b93dd0-1046-4e06-a9d3-f1c7cc66d754 user:[email protected] events/emitter.go:202

and I was able to get the added local principle.
image

Going to loopback with the customer.

@awly
Copy link
Contributor

awly commented Oct 14, 2020

User reports that this is no longer reproducible.

But if you put any {{external.X}}-style replacements in node_labels, teleport fails to start. This is a new validation added in 4.4.
We should instead log the error about invalid syntax, but interpret it as a literal string, just like older teleport versions did

@awly awly self-assigned this Oct 14, 2020
@benarent benarent added the blocker Blocker for the milestone label Oct 14, 2020
@webvictim
Copy link
Contributor

Did {{external.X}} in node_labels work in 4.3.7? I got the impression that was a supported use-case.

@awly
Copy link
Contributor

awly commented Oct 15, 2020

Ugh, you are right @webvictim.
Variable interpolation happens separately from label matching, which is why I missed it.

Given that it's a bad regression and we're about to release 4.4, I'll partially revert my changes and implement it the right way in a patch release.

@awly
Copy link
Contributor

awly commented Oct 15, 2020

This should be fixed.
#3454 track re-enabling the feature after we fix the regression.

@awly awly closed this as completed Oct 15, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
blocker Blocker for the milestone test-plan-problem Issues which have been surfaced by running the manual release test plan
Projects
None yet
Development

No branches or pull requests

3 participants