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

(v9) Add JWT auth guide for ElasticSearch #12612

Merged
merged 1 commit into from
Jun 2, 2022
Merged

Conversation

r0mant
Copy link
Collaborator

@r0mant r0mant commented May 12, 2022

Following #12567, I wanted to add a guide showing how to configure JWT authn with ElasticSearch.

I've factored out JWT into a separate section, will add Grafana to it later as well.

@jakule
Copy link
Contributor

jakule commented May 12, 2022

@r0mant Should we mention somewhere in the Database Access that ElasticSearch can be configured in Application access? I'd personally look for ElasticSearch in DB access and probably assume that it's not supported if it's not mentioned there.

@r0mant
Copy link
Collaborator Author

r0mant commented May 12, 2022

@jakule Yeah, this guide will probably become obsolete (or at least, less relevant) when we implement proper ElasticSearch support in Database Access but it's still ways off, and still may be useful for some folks I think.

@r0mant
Copy link
Collaborator Author

r0mant commented May 12, 2022

@jakule Actually, I think I may have misunderstood what you meant. You're talking about something like adding a link to this guide from Database Access guides section? Yes, I thought about it before also and I think it makes sense. I'll play around and see how it'd make sense to do it.

@jakule
Copy link
Contributor

jakule commented May 12, 2022

@jakule Actually, I think I may have misunderstood what you meant. You're talking about something like adding a link to this guide from Database Access guides section? Yes, I thought about it before also and I think it makes sense. I'll play around and see how it'd make sense to do it.

Yes, I was thinking about mentioning this guide in the Database Access to indicate that although we do not fully support ElasticSearch, there is a way to integrate it into Teleport. I think that most people don't know how Application access works and they may not be aware that such workaround exists. I understand that this is not a full support, but I still think it's work to mention it somewhere for better visibility.

@zmb3
Copy link
Collaborator

zmb3 commented May 12, 2022

Will this be forward-ported to master?

@r0mant
Copy link
Collaborator Author

r0mant commented May 12, 2022

Will this be forward-ported to master?

Yes. TBH I should have started with master but I started editing this in v9 and decided to push here first.

Copy link
Contributor

@ptgott ptgott left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Left a question to start. I can come back to this PR for a more thorough review next week.

docs/config.json Outdated Show resolved Hide resolved
docs/pages/application-access/jwt.mdx Show resolved Hide resolved
docs/pages/application-access/jwt.mdx Outdated Show resolved Hide resolved
docs/pages/application-access/jwt/elasticsearch.mdx Outdated Show resolved Hide resolved
docs/pages/application-access/jwt/elasticsearch.mdx Outdated Show resolved Hide resolved
docs/pages/application-access/jwt/elasticsearch.mdx Outdated Show resolved Hide resolved
docs/pages/application-access/jwt/elasticsearch.mdx Outdated Show resolved Hide resolved
docs/pages/application-access/jwt/elasticsearch.mdx Outdated Show resolved Hide resolved
docs/pages/application-access/jwt/elasticsearch.mdx Outdated Show resolved Hide resolved
docs/pages/application-access/jwt/elasticsearch.mdx Outdated Show resolved Hide resolved
docs/pages/application-access/jwt/elasticsearch.mdx Outdated Show resolved Hide resolved
@r0mant r0mant force-pushed the roman/v9/docs/jwt branch from 1a8bbe6 to d23c4e0 Compare May 20, 2022 17:39
@r0mant
Copy link
Collaborator Author

r0mant commented May 20, 2022

@ptgott I have addressed your feedback, can you take another look?

@r0mant r0mant requested a review from ptgott May 20, 2022 17:40
Copy link
Contributor

@ptgott ptgott left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added a final round of questions


## Prerequisites

- Teleport cluster version >= 9.3 with running Auth/Proxy Services and configured [Application Access](../guides/connecting-apps.mdx).
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we use something like the edition-prereqs-tabs.mdx partial instead of the first bullet? The benefit would be that there would be edition-specific information on getting started. Downsides would be that (a) there's no version warning in the partial and (b) tctl is mentioned in the partial but not the guide.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, in this case it is different enough that I don't think it's really worth it.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍
I think we can clarify "configured Application Access." Does that mean that there's at least one host running the Application Service and at least one connected application?

docs/pages/application-access/jwt/elasticsearch.mdx Outdated Show resolved Hide resolved
claims.principal: sub
claims.groups: roles
allowed_issuer: example-cluster
allowed_audiences: ["https://elasticsearch.example.com:9200"]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will this list always have a single element?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In most cases yes. It probably can have more than 1 element if other applications also use JWT auth and connect to ElasticSearch using different address.

docs/pages/application-access/jwt/elasticsearch.mdx Outdated Show resolved Hide resolved
@r0mant r0mant force-pushed the roman/v9/docs/jwt branch from d23c4e0 to a41099a Compare June 2, 2022 00:44
@r0mant r0mant requested a review from ptgott June 2, 2022 00:47
@r0mant
Copy link
Collaborator Author

r0mant commented Jun 2, 2022

@ptgott Sorry for delay, just got a chance to address your feedback. Could you take another look pelae?

Copy link
Contributor

@ptgott ptgott left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved with some notes


## Prerequisites

- Teleport cluster version >= 9.3 with running Auth/Proxy Services and configured [Application Access](../guides/connecting-apps.mdx).
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍
I think we can clarify "configured Application Access." Does that mean that there's at least one host running the Application Service and at least one connected application?

docs/pages/application-access/jwt/elasticsearch.mdx Outdated Show resolved Hide resolved
docs/pages/application-access/jwt/elasticsearch.mdx Outdated Show resolved Hide resolved
docs/pages/application-access/jwt/elasticsearch.mdx Outdated Show resolved Hide resolved
docs/pages/application-access/jwt/elasticsearch.mdx Outdated Show resolved Hide resolved
@r0mant r0mant force-pushed the roman/v9/docs/jwt branch from 7425fd8 to 2294de6 Compare June 2, 2022 22:00
@r0mant r0mant enabled auto-merge (squash) June 2, 2022 22:01
@r0mant r0mant merged commit cea279f into branch/v9 Jun 2, 2022
r0mant added a commit that referenced this pull request Jun 2, 2022
@r0mant r0mant deleted the roman/v9/docs/jwt branch June 2, 2022 23:21
@webvictim webvictim mentioned this pull request Jun 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants