All Projects → revinate → grpc-spring-security-demo

revinate / grpc-spring-security-demo

Licence: MIT License
Spring Boot-based gRPC server with gRPC endpoints secured by Spring Security

Programming Languages

java
68154 projects - #9 most used programming language

Projects that are alternatives of or similar to grpc-spring-security-demo

grpc-jwt-spring-boot-starter
Spring boot starter for gRPC framework with JWT authorization
Stars: ✭ 24 (-52%)
Mutual labels:  protobuf, grpc, grpc-java
liftbridge-api
Protobuf definitions for the Liftbridge gRPC API. https://github.com/liftbridge-io/liftbridge
Stars: ✭ 15 (-70%)
Mutual labels:  protobuf, grpc
Book-Finder
Book Finder application is a client-server application (gRPC) for educational purposes.
Stars: ✭ 20 (-60%)
Mutual labels:  grpc, grpc-java
protobuf-compiler
online protobuf compiler
Stars: ✭ 24 (-52%)
Mutual labels:  protobuf, grpc
agentgo
Hi! Agentgo is a tool for making remote command executions from server to client with golang, protocol buffers (protobuf) and grpc.
Stars: ✭ 15 (-70%)
Mutual labels:  protobuf, grpc
grpc-chat
Simple Chat Server/Client implemented with gRPC
Stars: ✭ 107 (+114%)
Mutual labels:  protobuf, grpc
grpcoin
API-driven cryptocurrency paper trading game. Write a bot and play!
Stars: ✭ 53 (+6%)
Mutual labels:  protobuf, grpc
grphp
PHP gRPC Framework
Stars: ✭ 19 (-62%)
Mutual labels:  protobuf, grpc
vtprotobuf
A Protocol Buffers compiler that generates optimized marshaling & unmarshaling Go code for ProtoBuf APIv2
Stars: ✭ 418 (+736%)
Mutual labels:  protobuf, grpc
tsrpc
A TypeScript RPC framework, with runtime type checking and serialization, support both HTTP and WebSocket. It is very suitable for website / APP / games, and absolutely comfortable to full-stack TypeScript developers.
Stars: ✭ 866 (+1632%)
Mutual labels:  protobuf, grpc
xrgrpc
gRPC library for Cisco IOS XR
Stars: ✭ 40 (-20%)
Mutual labels:  protobuf, grpc
modern-api-management
A modern approach to manage APIs effectively using Protobuf
Stars: ✭ 36 (-28%)
Mutual labels:  protobuf, grpc
sisyphus
Sisyphus is the way how we provide backend services.
Stars: ✭ 59 (+18%)
Mutual labels:  protobuf, grpc
ocaml-grpc-envoy
Using OCaml + gRPC via Envoy
Stars: ✭ 41 (-18%)
Mutual labels:  protobuf, grpc
docker-protobuf
An all-inclusive protoc Docker image
Stars: ✭ 105 (+110%)
Mutual labels:  protobuf, grpc
mnemosyne
Session management service with RPC API based on protobuf.
Stars: ✭ 15 (-70%)
Mutual labels:  protobuf, grpc
FSharp.GrpcCodeGenerator
A protoc plugin to enable generation of F# code
Stars: ✭ 61 (+22%)
Mutual labels:  protobuf, grpc
protoactor-go
Proto Actor - Ultra fast distributed actors for Go, C# and Java/Kotlin
Stars: ✭ 4,138 (+8176%)
Mutual labels:  protobuf, grpc
nameko-grpc
GRPC Extensions for Nameko
Stars: ✭ 51 (+2%)
Mutual labels:  protobuf, grpc
grpcman
A grpc testing tool based on Electron & Vue.js & Element-UI
Stars: ✭ 22 (-56%)
Mutual labels:  protobuf, grpc

gRPC Spring Security demo

This project demonstrates how to use Spring Security's method-based security mechanism to secure gRPC services. It is a gRPC server written in Java and built on Spring Boot. It uses gRPC interceptors to integrate with Spring Security, and supports two authentication mechanisms: HTTP Basic Auth and OAuth2 with JSON Web Tokens.

Within this demo, the following may be of interest:

The accompanying blog post contains more details about the background and motivations for this demo.

Requirements

  • Java 1.8 or newer

Usage

To start the application, run the following command in the project root directory:

./gradlew bootRun

This brings up the gRPC server, which runs on localhost port 7080.

For a simple way to interact with the gRPC server, without the need to create a client application, grpcc can be used.

With grpcc installed, start a client that connects to the gRPC server by running the following command in the src/main/proto directory in this project:

grpcc -i -p revinate/demo/demo.proto -a localhost:7080

This command starts the grpcc shell. Once in the shell, first create a variable to hold the metadata entry for Basic Auth credentials:

var md = cm({Authorization: "Basic Z3JwY3NwcmluZzpncnBjc3ByaW5n"})

Then make a call to the server using the credentials:

client.fibonacci({value: 10}, md, pr)
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].