Skip to content
This repository was archived by the owner on Dec 18, 2024. It is now read-only.

Commit acbd69b

Browse files
Remove JSON signing feature
Signed-off-by: Sebastian Schildt <sebastian.schildt@de.bosch.com>
1 parent 5547726 commit acbd69b

10 files changed

+20
-346
lines changed

README.md

-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ See [Supported Protocol](doc/protocol/README.md) for a detailled overview.
1616
- Websocket interface, TLS-secured or plain
1717
- [Experimental REST interface](doc/rest-api.md), TLS-secured or plain
1818
- [Fine-grained authorisation](doc/jwt.md) based on JSON Webtokens (RFC 7519)
19-
- Optional [JSON signing](doc/json-signing.md) of messages
2019
- Built-in MQTT publisher
2120
- [Python viss client](./kuksa_viss_client) to interactively explore and modify the VISS data points and data structure
2221
- Multiple [example apps](./kuksa_apps) in different programming languages to communicate with different frameworks

doc/json-signing.md

-16
This file was deleted.

include/SigningHandler.hpp

-52
This file was deleted.

include/VssCommandProcessor.hpp

-3
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,6 @@ class VssCommandProcessor : public IVssCommandProcessor {
3838
std::shared_ptr<IAuthenticator> tokenValidator;
3939
std::shared_ptr<IAccessChecker> accessValidator_;
4040
VSSRequestValidator *requestValidator;
41-
#ifdef JSON_SIGNING_ON
42-
std::shared_ptr<SigningHandler> signer;
43-
#endif
4441

4542
std::string processUpdateMetaData(kuksa::kuksaChannel& channel, jsoncons::json& request);
4643
std::string processAuthorizeWithPermManager(kuksa::kuksaChannel &channel, const std::string & request_id,

include/interface/ISigningHandler.hpp

-34
This file was deleted.

include/visconf.hpp

-1
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,5 @@
2020
#define MAX_SIGNALS 2000
2121
#define MAX_TREENODES 1024
2222
#define MAX_PARENT_BRANCHES 10
23-
//#define JSON_SIGNING_ON
2423

2524
#endif

src/SigningHandler.cpp

-115
This file was deleted.

src/VssCommandProcessor.cpp

-22
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,6 @@
3333
#include "ISubscriptionHandler.hpp"
3434
#include <boost/algorithm/string.hpp>
3535

36-
#ifdef JSON_SIGNING_ON
37-
#include "SigningHandler.hpp"
38-
#endif
3936

4037
using namespace std;
4138

@@ -51,18 +48,11 @@ VssCommandProcessor::VssCommandProcessor(
5148
subHandler = subhandler;
5249
accessValidator_ = accC;
5350
requestValidator = new VSSRequestValidator(logger);
54-
#ifdef JSON_SIGNING_ON
55-
// TODO: add signer as dependency
56-
signer = std::make_shared<SigningHandler>();
57-
#endif
5851
}
5952

6053
VssCommandProcessor::~VssCommandProcessor() {
6154
accessValidator_.reset();
6255
delete requestValidator;
63-
#ifdef JSON_SIGNING_ON
64-
signer.reset();
65-
#endif
6656
}
6757

6858

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

340330
if (action == "get") {
341331
response = processGet2(channel, root);
342-
#ifdef JSON_SIGNING_ON
343-
response = signer->sign(response);
344-
#endif
345332
}
346333
else if (action == "set") {
347334
response = processSet2(channel, root);
348-
#ifdef JSON_SIGNING_ON
349-
response = signer->sign(response);
350-
#endif
351335
}
352336
else if (action == "getMetaData") {
353337
response = processGetMetaData(root);
354-
#ifdef JSON_SIGNING_ON
355-
response = signer->sign(response);
356-
#endif
357338
}
358339
else if (action == "updateMetaData") {
359340
response = processUpdateMetaData(channel, root);
360-
#ifdef JSON_SIGNING_ON
361-
response = signer->sign(response);
362-
#endif
363341
}
364342
else if (action == "authorize") {
365343
string token = root["tokens"].as<string>();

0 commit comments

Comments
 (0)