Skip to content

Commit

Permalink
Merge pull request #242 from boschresearch/feature/remove-json-signing
Browse files Browse the repository at this point in the history
Remove JSON signing feature
  • Loading branch information
wenwenchenbosch authored Nov 22, 2021
2 parents 5547726 + c05dff0 commit 38edbfe
Show file tree
Hide file tree
Showing 10 changed files with 46 additions and 372 deletions.
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ See [Supported Protocol](doc/protocol/README.md) for a detailled overview.
- Websocket interface, TLS-secured or plain
- [Experimental REST interface](doc/rest-api.md), TLS-secured or plain
- [Fine-grained authorisation](doc/jwt.md) based on JSON Webtokens (RFC 7519)
- Optional [JSON signing](doc/json-signing.md) of messages
- Built-in MQTT publisher
- [Python viss client](./kuksa_viss_client) to interactively explore and modify the VISS data points and data structure
- Multiple [example apps](./kuksa_apps) in different programming languages to communicate with different frameworks
Expand Down
16 changes: 0 additions & 16 deletions doc/json-signing.md

This file was deleted.

52 changes: 0 additions & 52 deletions include/SigningHandler.hpp

This file was deleted.

3 changes: 0 additions & 3 deletions include/VssCommandProcessor.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,6 @@ class VssCommandProcessor : public IVssCommandProcessor {
std::shared_ptr<IAuthenticator> tokenValidator;
std::shared_ptr<IAccessChecker> accessValidator_;
VSSRequestValidator *requestValidator;
#ifdef JSON_SIGNING_ON
std::shared_ptr<SigningHandler> signer;
#endif

std::string processUpdateMetaData(kuksa::kuksaChannel& channel, jsoncons::json& request);
std::string processAuthorizeWithPermManager(kuksa::kuksaChannel &channel, const std::string & request_id,
Expand Down
34 changes: 0 additions & 34 deletions include/interface/ISigningHandler.hpp

This file was deleted.

1 change: 0 additions & 1 deletion include/visconf.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,5 @@
#define MAX_SIGNALS 2000
#define MAX_TREENODES 1024
#define MAX_PARENT_BRANCHES 10
//#define JSON_SIGNING_ON

#endif
115 changes: 0 additions & 115 deletions src/SigningHandler.cpp

This file was deleted.

22 changes: 0 additions & 22 deletions src/VssCommandProcessor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,6 @@
#include "ISubscriptionHandler.hpp"
#include <boost/algorithm/string.hpp>

#ifdef JSON_SIGNING_ON
#include "SigningHandler.hpp"
#endif

using namespace std;

Expand All @@ -51,18 +48,11 @@ VssCommandProcessor::VssCommandProcessor(
subHandler = subhandler;
accessValidator_ = accC;
requestValidator = new VSSRequestValidator(logger);
#ifdef JSON_SIGNING_ON
// TODO: add signer as dependency
signer = std::make_shared<SigningHandler>();
#endif
}

VssCommandProcessor::~VssCommandProcessor() {
accessValidator_.reset();
delete requestValidator;
#ifdef JSON_SIGNING_ON
signer.reset();
#endif
}


Expand Down Expand Up @@ -339,27 +329,15 @@ string VssCommandProcessor::processQuery(const string &req_json,

if (action == "get") {
response = processGet2(channel, root);
#ifdef JSON_SIGNING_ON
response = signer->sign(response);
#endif
}
else if (action == "set") {
response = processSet2(channel, root);
#ifdef JSON_SIGNING_ON
response = signer->sign(response);
#endif
}
else if (action == "getMetaData") {
response = processGetMetaData(root);
#ifdef JSON_SIGNING_ON
response = signer->sign(response);
#endif
}
else if (action == "updateMetaData") {
response = processUpdateMetaData(channel, root);
#ifdef JSON_SIGNING_ON
response = signer->sign(response);
#endif
}
else if (action == "authorize") {
string token = root["tokens"].as<string>();
Expand Down
Loading

0 comments on commit 38edbfe

Please sign in to comment.