Git Product home page Git Product logo

lightweightcmpra's People

Contributors

akretsch avatar ddvo avatar dependabot[bot] avatar kiron-mx avatar ralienpp avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

lightweightcmpra's Issues

Please rename `DownstreamExpirationTime` to `TransactionMaxLifetime`

This is a follow-up on #7, as discussed.

Please also tweak the description in README.md, as follows:

The **`TransactionMaxLifetime` object**
optionally specifies the maximum lifetime of CMP transactions.
The Lightweight CPM RA persists the message exchange state of each transaction
until its regular or erroneous termination or until its age reaches the
given number of seconds.
By default, or if the value 0 is given, transaction lifetime is not restricted.
Restricting transaction lifetime avoids blocking RA resources indefinitely
for instance when an expected subsequent request message by the client is lost
or the client terminates during a transaction without the RA knowing.

Further adaptations to `DownstreamExpirationTime` vs. `TransactionMaxLifetime`

This is a follow-up on #7 und #8.

After our clarifying recent discussion, please further tweak the implementation and doc as follows.

  • Rename TransactionMaxLifetime (and the leftover parameter/variable name downstreamExpirationTime) to DownstreamTimeout.
  • The RA component sets up the internal time limit of a transaction in the moment when returning a response to downstream if it remembers the transaction because it expects further (polling or other) requests from downstream.
    If the response contains a retryAfter value, this value is added to the configured timeout value (such that the time limit is extended by the expected waiting time of the client).
  • Adapt the documentation in the configuration README file accordingly, for instance like this.
The **`DownstreamTimeout` object**
optionally specifies the maximum allowed reaction time of the downstream entity
apart from any applicable `retryAfter` period.
That is, the RA will keep a transaction open while awaiting a further request
form the client side until it receives the expected request or the configured
number of seconds, plus any `retryAfter` time given in its last response, has elapsed.
In the latter case the RA cleans up and forgets the transaction.<br>
By default, or if the value 0 is given, no restriction is placed,
such that a transaction may idle indefinitely. It is recommended to specify
a nonzero timeout value in order to prevent blocking RA resources indefinitely,
for instance when an expected subsequent request message by the client is lost
or the client terminates during a transaction without the RA knowing.
  • Adapt the documenting comment(s) in the respective CMP RA Component API Java file.

`EnrollmentContext` config object: exception on RA component if `RequestCentralKeyGeneration` set to `true`

I get

[main] WARN com.siemens.pki.cmpracomponent.msgvalidation.BaseCmpException - error at ClientUpstream: message is incomplete protected but protection is required
Exception in thread "main" java.lang.RuntimeException: error processing invokeEnrollment
	at com.siemens.pki.cmpclientcomponent.main.CmpClient.invokeEnrollment(CmpClient.java:575)
	at com.siemens.pki.lightweightcmpclient.main.CliCmpClient.doEnrollment(CliCmpClient.java:206)
	at com.siemens.pki.lightweightcmpclient.main.CliCmpClient.runClient(CliCmpClient.java:377)
	at com.siemens.pki.lightweightcmpclient.main.CliCmpClient.main(CliCmpClient.java:317)
Caused by: CmpException [failInfo=65536, errorDetails=ClientUpstream: message is incomplete protected but protection is required]
	at com.siemens.pki.cmpracomponent.msgvalidation.ProtectionValidator.validate(ProtectionValidator.java:78)
	at com.siemens.pki.cmpclientcomponent.main.ClientRequestHandler$ValidatorAndProtector.validateResponse(ClientRequestHandler.java:129)
	at com.siemens.pki.cmpclientcomponent.main.ClientRequestHandler.sendReceiveValidateMessage(ClientRequestHandler.java:334)
	at com.siemens.pki.cmpclientcomponent.main.CmpClient.invokeEnrollment(CmpClient.java:482)

Any reason to stick to Californium 1.0.6 instead of a 2.0.0-2.4.1 release?

I currently try to find out, how users decide to take which version of Californium in order to

  • improve that decision
  • improve newer Californium versions, if there are serious reasons to chose a older one.

So, have there been any serious reasons not to use one of the 2. releases of Californium?

add optional per-request/response timeout value

As recommended in https://datatracker.ietf.org/doc/html/draft-ietf-lamps-lightweight-cmp-profile#name-cmp-message-transfer-mechan:

Independently of the means of transfer, it can happen that messages are lost or that a communication partner does not respond. To prevent waiting indefinitely, each PKI entity that sends CMP requests SHOULD use a configurable per-request timeout, and each PKI management entity that handles CMP requests SHOULD use a configurable per-response timeout in case a further request message is to be expected from the client side within the same transaction. In this way a hanging transaction can be closed cleanly with an error as described in Section 3.6 (failInfo bit: systemUnavail) and related resources (for instance, any cached extraCerts) can be freed.

So please add a configurable maximal time (in seconds) to wait for responses on the upstream interface (e.g. HTTP)
and to wait for subsequent requests (where applicable) on the downstream interface, with reasonable default values.
A value of 0 shall mean to wait indefinitely.

It could be considered an error if a non-zero downstream timeout value given is smaller than any configured retryAfter value.

`UpstreamInterface` and `MessageInterface` config object: clarify choice taken

For

|0..n| [`HttpClient` object](#the-httpclient-object) |
|0..n| [`HttpsClient` object](#the-httpsclient-object) |
|0..n| [`CoapClient` object](#the-coapclient-object) |
|0..n| [`OfflineFileClient` object](#the-offlinefileclient-object) |

it should be defined which of them is chosen if, e.g., both HttpClient and HttpsClient (with no or with same certProfile) are given.

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.