Code Monkey home page Code Monkey logo

Comments (5)

runephilosof-karnovgroup avatar runephilosof-karnovgroup commented on June 2, 2024 1

Something in the database will need to indicate that it is invalid.
Maybe add a field (either registration_token:string or registered:bool).

from woodpecker.

qwerty287 avatar qwerty287 commented on June 2, 2024

Maybe I completely misunderstand this, but what about this case:

  1. Start agent with some token set vie env var
  2. The server invalidates the token.
  3. Shut down the agent.
  4. Start the agent again. This should work without changing the env vars.

Maybe you could also fix your problem with #3199?

from woodpecker.

runephilosof-karnovgroup avatar runephilosof-karnovgroup commented on June 2, 2024

Maybe the token should be exchanged for another token, which is saved in the agent config.

from woodpecker.

runephilosof-karnovgroup avatar runephilosof-karnovgroup commented on June 2, 2024

@anbraten @6543 This is a security issue since it seems like some people are using the woodpecker autoscaler in a way that makes the token available to jobs (I say that because woodpecker-ci/autoscaler#15 (comment) is merged).

from woodpecker.

anbraten avatar anbraten commented on June 2, 2024

Maybe the token should be exchanged for another token, which is saved in the agent config.

So sth like this?

  • The registration-token would be generated via an api endpoint, already creating the agent db entry with the final agent-token
  • The generated registration-token maybe a jwt-token containing the resulting agent-id is returned and invalidated
  • The agent exchanges the registration-token for an agent-token
  • The fetched agent-token is saved to the config
  • The agent is from now on using the agent-token from the config file

from woodpecker.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.