Replies: 4 comments 2 replies
-
Your auth service config looks fine. What does your tbot configuration look like? |
Beta Was this translation helpful? Give feedback.
-
I think you want an onboarding config in your onboarding:
token: mybottoken
join_method: token |
Beta Was this translation helpful? Give feedback.
-
Thank you for your quick responses @zmb3 and @webvictim. As of now I was creating the tbot using CLI like so :- tbot start This is output of tctl get tokens for "mybottoken" created by the above auth service ( the join method here is "" and not editable ) kind: token
The error I get when I try to join using the tbot start command above is I believe @webvictim you're suggesting I use a config file to create the tbot with tbot configure and add the join method and token? I will try doing that and let you know if it works! It might be important to note that I am trying to run this in a bitbucket pipeline so the tbot host is not a VM but a debian docker container which doesn't have systemd support. In case the additional information provided in this reply has helped you to another approach or reinforced the same one, do let me know. Thanks again! |
Beta Was this translation helpful? Give feedback.
-
I tested this myself and can confirm it doesn't work. I get the same error: The token isn't able to be looked up by name, which is a problem:
I'm checking with the Machine ID team to see whether this is an expected use case or not. My guess is that because Machine ID join tokens are technically single-use, the use case where a token is statically defined once in the config file and used multiple times is not supported. If this is the case, however, we should error when How to do this correctlyAs per the docs (https://goteleport.com/docs/enroll-resources/machine-id/getting-started/#step-24-create-a-bot-user), the supported way to create and use single-use bot tokens is to create them dynamically, either by:
kind: bot
version: v1
metadata:
name: my-bot
spec:
roles: ['access']
kind: token
version: v2
metadata:
name: mybottoken
spec:
roles: [Bot]
join_method: token
bot_name: my-bot Then add them both to the cluster:
After this, you can start the bot and have it join the cluster correctly:
|
Beta Was this translation helpful? Give feedback.
-
I am creating a static token to be used by my CI/CD pipeline. I know it is discouraged but I need a reusable token since teleport does not have a bitbucket pipelines integration.
So to configure my bot to access resources in my teleport cluster, I could specify role and token name as below :
But when I have my bot join the cluster using this, it throws an error saying invalid join method.
Upon inspecting the tokens. Static tokens do not have a join method at all. It's an empty string.
Can anyone please help me with a way to configure the join method for static tokens?
Beta Was this translation helpful? Give feedback.
All reactions