Code Monkey home page Code Monkey logo

example-config-service's People

Contributors

6543 avatar anbraten avatar pinpox avatar s00500 avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Forkers

s00500 pinpox

example-config-service's Issues

Signature verification is broken

I added some debugging logs to the the signature verification code:

		keyID, err := verifier.Verify(r)
		if err != nil {
			log.Printf("config: invalid or missing signature in http.Request %s", err)
			http.Error(w, "Invalid or Missing Signature", http.StatusBadRequest)
			return
		}

Which shows:

Aug 11 18:12:42 kfbox woodpecker-flake-pipeliner[171813]: 2023/08/11 18:12:42 config: invalid or missing signature in http.Request no params present

To check if a signature was present I piped the POST request coming from Woodpecker to a request bin:
image

I tracked down the error is coming from here, but as you can see in the image above there is actually a signature. I suspect the cause is this commit which seems to have changed the header in which the verifier expects the signature. If I'm not mistaken the header shold be "Signature" with a capital "S" as shown [here]
https://github.com/go-ap/httpsig/blob/3647b4d88fdf75dc8b4202e119a582db1690fe9d/verify.go#L159-L161

Make PubKeyFile able to get from URL

at the moment:
WOODPECKER_CONFIG_SERVICE_PUBLIC_KEY_FILE=public-key.pem

what would be nice:
WOODPECKER_URL=http(s)://your-woodpecker-server:123
that will download key from http(s)://your-woodpecker-server:123/api/signature/public-key

Bump httpsig version

seems like the httpsig package needs an update....
It broke for me when I updated woody server today and I had to update the package in the config service too to get it back to work...
also the repo has ben archived by the owner... I can do that later this week...

Issue with key

For some reason I cant make this work... when I fetch the key I get a file with
-----BEGIN PUBLIC KEY-----
base64 string
-----END PUBLIC KEY-----

This will not load with hex.DecodeString

I tried decoding the base64 before but only get an invalid key length error later....

What have I misunderstood ?

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.