![Maven Central Adds Sigstore Signature Validation](https://cdn.sanity.io/images/cgdhsj6q/production/7da3bc8a946cfb5df15d7fcf49767faedc72b483-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Maven Central Adds Sigstore Signature Validation
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.
github.com/nicholasjackson/building-microservices-youtube/currency
The currency service is a gRPC service which provides up to date exchange rates and currency conversion capabilities.
To build the gRPC client and server interfaces, first install protoc:
sudo apt install protobuf-compiler
brew install protoc
Then install the Go gRPC plugin:
go get google.golang.org/grpc
Then run the build command:
protoc -I protos/ protos/currency.proto --go_out=plugins=grpc:protos/currency
To test the system install grpccurl
which is a command line tool which can interact with gRPC API's
https://github.com/fullstorydev/grpcurl
go install github.com/fullstorydev/grpcurl/cmd/grpcurl
grpcurl --plaintext localhost:9092 list
Currency
grpc.reflection.v1alpha.ServerReflection
grpcurl --plaintext localhost:9092 list Currency
Currency.GetRate
Currency.SubscribeRates
grpcurl --plaintext localhost:9092 describe Currency.GetRate
Currency.GetRate is a method:
rpc GetRate ( .RateRequest ) returns ( .RateResponse );
grpcurl --plaintext --msg-template localhost:9092 describe .RateRequest
RateRequest is a message:
message RateRequest {
string Base = 1 [json_name = "base"];
string Destination = 2 [json_name = "destination"];
}
Message template:
{
"Base": "EUR",
"Destination": "EUR"
}
➜ grpcurl --plaintext -d '{"Base": "GBP", "Destination": "USD"}' localhost:9092 Currency/GetRate
{
"rate": 1.2229967868538965
}
The parameter -d @
means that gRPCurl will read the messages from StdIn.
grpcurl --plaintext --msg-template -d @ localhost:9092 Currency/SubscribeRates
You can send a message to the server using the following payload
{
"Base": "EUR",
"Destination": "GBP"
}
FAQs
Unknown package
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.
Security News
CISOs are racing to adopt AI for cybersecurity, but hurdles in budgets and governance may leave some falling behind in the fight against cyber threats.
Research
Security News
Socket researchers uncovered a backdoored typosquat of BoltDB in the Go ecosystem, exploiting Go Module Proxy caching to persist undetected for years.