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

Inject bot / api token as environment variable #368

Open
3 tasks done
anbraten opened this issue Sep 27, 2021 · 2 comments
Open
3 tasks done

Inject bot / api token as environment variable #368

anbraten opened this issue Sep 27, 2021 · 2 comments
Labels
feature add new functionality

Comments

@anbraten
Copy link
Member

Clear and concise description of the problem

As a developer I want to create plugins which could interact with the woodpecker-api via curl or the official client. For this I would need some token.

Suggested solution

The needed token to access the woodpecker-ui could automatically be injected into each woodpecker step, so plugins could directly use it. It would be best if the bot-token is only valid for some short duration or the time the pipeline run is being executed and has some limited permissions.

Alternative

No response

Additional context

Would be useful for #367

Validations

@anbraten anbraten added the feature add new functionality label Sep 27, 2021
@anbraten anbraten changed the title Bot / api token as environment variable Inject bot / api token as environment variable Sep 27, 2021
@6543
Copy link
Member

6543 commented Jan 6, 2022

I would suggest to create temporary auth token for each job with limited scope of access ... so not usig #665 since this has a other usecase ... but we can share code of cource.

Idea: extemd proc structure witb a token field

@anbraten
Copy link
Member Author

anbraten commented Jan 6, 2022

I would extract the (api)-token from the user and add it to a separate model / table to have one single place to store tokens. If a pipeline gets started we could simply add a new token and remove it again after the pipeline finished.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature add new functionality
Projects
None yet
Development

No branches or pull requests

2 participants