Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Require X-Request-ID and X-Correlation-ID request headers to Versions and Credentials endpoints #13

Open
ewf-devops opened this issue May 6, 2020 · 0 comments
Labels
bug Something isn't working trivial

Comments

@ewf-devops
Copy link

Original report by Adam Staveley (Bitbucket: [Adam Staveley](https://bitbucket.org/Adam Staveley), GitHub: adamstaveley).


Currently, planned and connected parties do not need to include X-Request-ID and X-Correlation-ID headers in their requests to the Versions and Credentials endpoints. This should be changed to reflect the OCPI documentation here: https://github.com/ocpi/ocpi/blob/master/transport_and_format.asciidoc#12-unique-message-ids

dv-rosales pushed a commit that referenced this issue Aug 12, 2024
1.0.0

* enable pipelines

* Initial Bitbucket Pipelines configuration

* deploy broker to test environment

* fix bitbucket-pipelines.yml

* Squashed commit of the following:

    commit cd5c0531eb5cdc96d7975938a4dc8fba05dd5b7d
    Author: Adam Staveley <[email protected]>
    Date:   Fri Jun 14 00:55:56 2019 +0200

        implement AdminController and AdminControllerTest; setup JPA

* Squashed commit of the following:

    commit 2c2d41703ccf30fbeae153272f107361e90e66d8
    Author: Adam Staveley <[email protected]>
    Date:   Fri Jun 14 15:18:15 2019 +0200

        add 2.2 version details endpoint

    commit a0189b9b1f4875ea05827656ae17f2dc2b387445
    Author: Adam Staveley <[email protected]>
    Date:   Fri Jun 14 14:30:59 2019 +0200

        add ToolsTest

    commit 3617ed2675625901082d71226ad5fc8bb0f5e212
    Author: Adam Staveley <[email protected]>
    Date:   Fri Jun 14 14:26:04 2019 +0200

        implement versions information endpoint

* Squashed commit of the following:

    commit 15ceca3fd2c89266071ed482346233b91b6c7e83
    Author: Adam Staveley <[email protected]>
    Date:   Fri Jun 14 18:15:00 2019 +0200

        build documentation using spring rest docs

* fix api doc filepaths in README

* move built documentation to static bitbucket site

* iterable party by auth return type

* Squashed commit of the following:

    commit 3b3078b76f302069edf3ea7a117fe7fa8a9c414a
    Author: Adam Staveley <[email protected]>
    Date:   Thu Jun 20 17:47:09 2019 +0200

        make GET credentials error message consistent with PUT and DELETE

    commit b7c9c03ef96f50130299c553659e07237a2deb62
    Author: Adam Staveley <[email protected]>
    Date:   Thu Jun 20 17:42:07 2019 +0200

        add DELETE handler

    commit cb96220f892d0fb1e360abde7df45539fc317075
    Author: Adam Staveley <[email protected]>
    Date:   Wed Jun 19 09:48:41 2019 +0200

        add PUT handler

    commit a046097770193b20e3c354fd90fd7948d2eaa03d
    Author: Adam Staveley <[email protected]>
    Date:   Tue Jun 18 16:56:45 2019 +0200

        remodel repositories into hierarchical organization -> credentials structure

    commit be542296ff9ed347b50ad53e8aaaeda74b3fe75e
    Author: Adam Staveley <[email protected]>
    Date:   Mon Jun 17 18:37:54 2019 +0200

        add POST credentials

    commit 8c6844619244c81e4983f3e33e5bf61acf264eec
    Author: Adam Staveley <[email protected]>
    Date:   Mon Jun 17 14:10:35 2019 +0200

        add GET credentials

* Squashed merge with feature/locations-controller branch

* rework pipelines for testing and building using different profiles

* merge sqaush with feature/sessions-controller

* merge squash with improvements branch

* merge squash of feature/cdrs-controller branch

* add tariffs controller and tests

* merge squash of feature/tokens-controller

* fix tariffs controller mappings

* run setup script from inside host

* fix tokens controller mappings

* merge squash with feature/commands-controller

* add basic hubclientinfo sender interface

* move develop pipeline to open-testing

* add psql driver and example properties file

* skip tests on remote host build

* replace old interface roles with sender and receiver

* squash merge branch open-testing

* merge squash with documentation-improvements

* README.md edited online with Bitbucket

* README.md edited online with Bitbucket

* add initial usage examples/tutorial

* remove properties import from RoutingServiceTest

* fix pipelines to run build by default

* merge squash with documentation/ocpi-usage-examples

* fix incorrect parameters in party_id/country_code check

* merge squash with feature/client-to-client-auth

* add develop deployment and example service file

* remove typo in bitbucket-pipelines

* update volta registry contract address

* add /admin/connection-status

* add new test2 deployment host

* fix typo in pipelines

* upgrade gradle plugins and project dependencies

* downgrade asciidoctor plugin

* make tariff type nullable

* reorder tutorial steps

* refactor GET cdrs - remove routing logic from request handler

* rewrite cdr receiver interfaces and add generic proxying of resources

* rewrite commands sender interface and add commands controller tests

* temporarily remove default pipeline action

* refactor back to controller method having more control over routing

* OCN-292: disallow OCPI connection without OCN Registry entry first

* add cdrs receiver tests and concat local/proxy preparation functions in routing service

* clean cdrs controller/test

* clean cdrs controller/test

* proxy paginated cdr request and provide empty get cdr page mapping

* add paginated cdr endpoint

* add command receiver interfaces and sender test

* create new proxy body in commands receiver interface

* remaining commands receiver endpoints tests with proxy body

* commands controller clean up

* locations sender interface and tests; moduleID enum rename

* locations receiver plus tests

* add locations page request and rename cdrs page request

* sessions sender interface and tests

* sessions receiver interface and tests

* tariffs sender interface and tests

* simpler proxyPaginationHeaders interface; tariffs receiver interface and tests

* tokens controller and tests

* change response type back to enum; routing service preparation function tests

* routing service proxyResource helper tests, clean up

* extract sign/verify functions to credential service; remaining routing service tests; document service functions

* add hubclientinfo service tests

* message controller and tests; rename htttpRequestService and makeRequest

* fix proxy resource entity and add repo tests

* fix circular dependencies in config/credentails service

* rename credentials service to wallet service to avoid confusion with ocpi credentials module

* add client-info endpoint in postman collection; readme typo

* extract next url from link http header

* combine OcpiRequestVariables with OcnMessageBody; include request data type in ocn message request; various renaming

* no type information in request variables

* simplify http service for caller and provide mockable makeOcpiRequest overload

* remove lambda makeOcpiRequest parameter for easier testing

* post ocn message sends request vars as string data

* set resource to be proxied by remote client

* switch sender and receiver on proxy response_url requests

* remove logs

* update tutorial and remove open-testing information in README

* tutorial step 4 headers

* re-enable default pipeline step

* add rsync TODO item

* clean up todo items

* clean up models; change name of data class encode methods to toMap

* Merged in misc/improve-config-defaults (pull request #1)

    db and logging config changes

* Merged in feature/OCN-286-https (pull request #3)

    made a test case for HTTPS request

    Approved-by: Arzon Barua <[email protected]>

* Merged in feature/OCN-286-revert-changes (pull request #5)

    revert the changes of test case

    Approved-by: Adam Staveley <[email protected]>

* Merged in bugfix/OCN-384-read-data-from-registry (pull request #2)

    Bugfix/OCN-384 read data from registry

    * log registry info and improve registry api

    * remove belongsToMe debug prints

    * check for client url OR address on ocn/registry/client endpoint

    Approved-by: Ali Askari <[email protected]>

* Merged in jrhender/ocn-client/httpServiceTests (pull request #7)

    HttpServiceTests

    * initial working getVersions HttpServiceTest

    * minor improvements to HtpServiceTest getVersions

    Approved-by: Adam Staveley <[email protected]>

* Merged in license-update (pull request #8)

    Update copyright license holder

* Merged in handle-socket-timeout (pull request #6)

    add SocketTimeoutException handler

    * add SocketTimeoutException handler

    * add ConnectException too

    Approved-by: Arzon Barua <[email protected]>

* Merged in bug/versions-token-c (pull request #9)

    Bugfix: versions controller allows token c authorization

    * Update copyright license holder

    * /versions and /2.2 allow token C authorization

    Approved-by: Arzon Barua <[email protected]>

* Merged in name-change (pull request #11)

    Name change

    * Update copyright license holder

    * rename all client references to node

    * update registry facade

    * update to new contract

    * update readme with rename info

    Approved-by: Arzon Barua <[email protected]>

* README.md edited online with Bitbucket

* Merged in feature/https-warning (pull request #10)

    Feature/https warning

    * Update copyright license holder

    * upgrade gradle and plugins

    * dev/prod toggle

    * add initial URL checker on application start event

    * moved public URL test to its own component and run application context test on defined port

    * updated README with public URL and dev/prod mode information

    * fix readme informatoin regarding default runtime mode

    Approved-by: Arzon Barua <[email protected]>

* Merged in ocn-288/message-signing (pull request #12)

    Message Signing

    * signature toggle and node info logging

    * refactor core controllers to use request handler builder; rewrite CdrsControllerTest

    * CommandsControllerTest rewrite

    * rewrite LocationsControllerTest

    * rewrite and enable remaining tests; use RequestHandler in OcnMessage Controller

    * request handler null safety and tests

    * proxy remote request body reorder changes; debug commands over remote node

    * fix ocn message test by creating request handler with string body

    * remove debug logs

    * update examples with postman environment

    * add notary dependency; add signature to request headers; rename ocpi request headers to ocn headers

    * add validateSender tests and move request handler to services

    * add ocn message with signature test

    * rewrite signature on command receiver request

    * add javadoc comments to the RequestHandler/Builder

    * updated readme with message signing information

    * exclude junit-vintage-engine dependency from spring-boot-starter-test

    Approved-by: Arzon Barua <[email protected]>

* Merged in feature/ocpi_v2_2 (pull request #13)

    reviewed and change according to ocpi 2.2 final release

    * reviewed and change according to ocpi 2.2 final release

    * remove extra exclude in gradle build deps

    * renamed variable to endDateTime and fixed the restrictions spelling

    * fix versions data format

    * update examples readme

    Approved-by: Adam Staveley <[email protected]>

* Merged in feature/chargingprofiles (pull request #14)

    Feature/chargingprofiles

    * sender POST method

    * sender PUT method

    * change PublishTokenType.type to TokenType

    * GET receiver method; changed urlEncodedParams type map

    * PUT receiver method and correct request mappings

    * DELETE receiver method

    * rework docker-compose setup to reduce build times in container

    * fix readme example build step

    * docker-compose make registry-deploy depend on ganache

    Approved-by: Arzon Barua <[email protected]>

* hotfix to url-encoded parameters incorrectly mapped to String

* Merged in license-change (pull request #16)

    source code file headers changed to apache; GPLv3 COPYING changed to Apache LICENSE file

    Approved-by: Christopher Burgahn <[email protected]>

* Merged in ocn-612/white-blacklisting (pull request #19)

    Ocn 612/white blacklisting

    * initial ocnrules controller

    * add ocnrules to versions detail endpoint (plus chargingprofiles)

    * add rules list entity and repository

    * set default rules on credentials handshake

        Signed-off-by: Adam Staveley <[email protected]>

    * add update whitelist function

        Signed-off-by: Adam Staveley <[email protected]>

    * add ocn rules POST and DELETE methods; enforce signatures rule

        Signed-off-by: Adam Staveley <[email protected]>

    * PUT /ocnrules/signatures to toggle on/off

        Signed-off-by: Adam Staveley <[email protected]>

    * validate whitelisted sender

        Signed-off-by: Adam Staveley <[email protected]>

    * update readme with dco/contributing guidelines

        Signed-off-by: Adam Staveley [email protected]

    * add api descriptions for registry and OcnRules

        Signed-off-by: Adam Staveley [email protected]

    * Merged in feature/blacklisting (pull request #18)

        Feature/blacklisting

        * added feature for the blacklist

        * added feature for the blacklist

            Signed-off-by: Arzon <arzon>

        Approved-by: Adam Staveley <[email protected]>

    * expand HTTP API documentation in readme

        Signed-off-by: Adam Staveley <[email protected]>

    * set platform rules list active after deletion

        Signed-off-by: Adam Staveley <[email protected]>

    * set default rules to false for db migration

        Signed-off-by: Adam Staveley <[email protected]>

    Approved-by: Arzon Barua <[email protected]>

* upgrade web3j and registry contract facade

* node private key verification

    Signed-off-by: Adam Staveley <[email protected]>

* Merged in feature/module-whitelist (pull request #20)

    ocn-734,ocn-735

    * ocn-734,ocn-735

        Signed-off-by: Arzon <arzon>

    * check modules

        Signed-off-by: Arzon <arzon>

    * remove comments

        Signed-off-by: Arzon <arzon>

    * updated Documentation

        Signed-off-by: Arzon <arzon>

    * updated put method example

        Signed-off-by: Arzon <arzon>

    Approved-by: Adam Staveley <[email protected]>

* use configured private key; remove wallet repository

    Signed-off-by: Adam Staveley <[email protected]>

* update examples readme with new registry information

* update examples readme with new registry information

    Signed-off-by: Adam Staveley <[email protected]>

* update registry address

    Signed-off-by: Adam Staveley <[email protected]>

* ocn_signature goes in response body

    Signed-off-by: Adam Staveley <[email protected]>

* verify and rewrite response signature

    Signed-off-by: Adam Staveley <[email protected]>

* test response signatures

    Signed-off-by: Adam Staveley <[email protected]>

* support roles with same party_id; only strip res sig if modifying; check if sender is known before looking up OcnRules

    Signed-off-by: Adam Staveley <[email protected]>

* consistent ocn credentials; fix bad restful links; start integration tests for signatures

* add gaanche task and deploy registry before integration test

    Signed-off-by: Adam Staveley <[email protected]>

* register cpo parties to test nodes

* javalin auth handling

* Merged in feature/black-white-list (pull request #22)

    Feature/black white list

    * check modules, get rules, update blacklist whitelist

        Signed-off-by: Arzon <arzon>

    * updated single update and blacklist

        Signed-off-by: Arzon <arzon>

    * changed code for check single module

        Signed-off-by: Arzon <arzon>

    * updated documentation

        Signed-off-by: Arzon <arzon>

    * changed according to feedback

        Signed-off-by: Arzon <arzon>

    Approved-by: Adam Staveley <[email protected]>

* add get location integration tests

    Signed-off-by: Adam Staveley <[email protected]>

* set signatures on for test and upgrade notary to 0.4.0 beta

    Signed-off-by: Adam Staveley <[email protected]>

* (failing) paginated integration test - requires notary fix; added pagination params to proxy endpoints

    Signed-off-by: Adam Staveley <[email protected]>

* fix private key not being passed into notary rewrite sign function

    Signed-off-by: Adam Staveley <[email protected]>

* restful post request integration test and setup async command test

    Signed-off-by: Adam Staveley <[email protected]>

* async commands request integration test

    Signed-off-by: Adam Staveley <[email protected]>

* remove overriding set paginated headers and configure test tasks in gradle config

* change pipeline config to use ganache for integration tests

    Signed-off-by: Adam Staveley <[email protected]>

* fix pipeline cache naming

    Signed-off-by: Adam Staveley <[email protected]>

* just install ganache manually

    Signed-off-by: Adam Staveley <[email protected]>

* ganache output goes to /dev/null

    Signed-off-by: Adam Staveley <[email protected]>

* ganache mnemonic without string literal escapes

    Signed-off-by: Adam Staveley <[email protected]>

* just do unit tests in pipelines

    Signed-off-by: Adam Staveley <[email protected]>

* try pipeline integrationTest task again with fixed mnemonic

    Signed-off-by: Adam Staveley <[email protected]>

* fix pipeline dependency

    Signed-off-by: Adam Staveley <[email protected]>

* install ganache in pipeline

    Signed-off-by: Adam Staveley <[email protected]>

* update README, include prod properties, remove hubclientinfo

    Signed-off-by: Adam Staveley <[email protected]>

* Merged in ocn-746/migrate-to-new-registry (pull request #21)

    Update to registry v2

    * upgrade web3j and registry contract facade

    * node private key verification

        Signed-off-by: Adam Staveley <[email protected]>

    * use configured private key; remove wallet repository

        Signed-off-by: Adam Staveley <[email protected]>

    * update examples readme with new registry information

    * update examples readme with new registry information

        Signed-off-by: Adam Staveley <[email protected]>

    * update registry address

        Signed-off-by: Adam Staveley <[email protected]>

    Approved-by: Arzon Barua <[email protected]>

* update default properties with test/prod details

    Signed-off-by: Adam Staveley <[email protected]>

* minor readme typos fixed

    Signed-off-by: Adam Staveley <[email protected]>

* upgrade version to 1.0.0

    Signed-off-by: Adam Staveley <[email protected]>

* exclude test from build step in readme

    Signed-off-by: Adam Staveley <[email protected]>

* Merged in ocn-675/signed-repsonses (pull request #23)

    Ocn 675/signed repsonses

    * upgrade web3j and registry contract facade

    * node private key verification

        Signed-off-by: Adam Staveley <[email protected]>

    * use configured private key; remove wallet repository

        Signed-off-by: Adam Staveley <[email protected]>

    * update examples readme with new registry information

    * update examples readme with new registry information

        Signed-off-by: Adam Staveley <[email protected]>

    * update registry address

        Signed-off-by: Adam Staveley <[email protected]>

    * ocn_signature goes in response body

        Signed-off-by: Adam Staveley <[email protected]>

    * verify and rewrite response signature

        Signed-off-by: Adam Staveley <[email protected]>

    * test response signatures

        Signed-off-by: Adam Staveley <[email protected]>

    * support roles with same party_id; only strip res sig if modifying; check if sender is known before looking up OcnRules

        Signed-off-by: Adam Staveley <[email protected]>

    * consistent ocn credentials; fix bad restful links; start integration tests for signatures

    * add gaanche task and deploy registry before integration test

        Signed-off-by: Adam Staveley <[email protected]>

    * register cpo parties to test nodes

    * javalin auth handling

    * add get location integration tests

        Signed-off-by: Adam Staveley <[email protected]>

    * set signatures on for test and upgrade notary to 0.4.0 beta

        Signed-off-by: Adam Staveley <[email protected]>

    * (failing) paginated integration test - requires notary fix; added pagination params to proxy endpoints

        Signed-off-by: Adam Staveley <[email protected]>

    * fix private key not being passed into notary rewrite sign function

        Signed-off-by: Adam Staveley <[email protected]>

    * restful post request integration test and setup async command test

        Signed-off-by: Adam Staveley <[email protected]>

    * async commands request integration test

        Signed-off-by: Adam Staveley <[email protected]>

    * remove overriding set paginated headers and configure test tasks in gradle config

    * change pipeline config to use ganache for integration tests

        Signed-off-by: Adam Staveley <[email protected]>

    * fix pipeline cache naming

        Signed-off-by: Adam Staveley <[email protected]>

    * just install ganache manually

        Signed-off-by: Adam Staveley <[email protected]>

    * ganache output goes to /dev/null

        Signed-off-by: Adam Staveley <[email protected]>

    * ganache mnemonic without string literal escapes

        Signed-off-by: Adam Staveley <[email protected]>

    * just do unit tests in pipelines

        Signed-off-by: Adam Staveley <[email protected]>

    * try pipeline integrationTest task again with fixed mnemonic

        Signed-off-by: Adam Staveley <[email protected]>

    * fix pipeline dependency

        Signed-off-by: Adam Staveley <[email protected]>

    * install ganache in pipeline

        Signed-off-by: Adam Staveley <[email protected]>

    * update README, include prod properties, remove hubclientinfo

        Signed-off-by: Adam Staveley <[email protected]>

    * update default properties with test/prod details

        Signed-off-by: Adam Staveley <[email protected]>

    * minor readme typos fixed

        Signed-off-by: Adam Staveley <[email protected]>

    * upgrade version to 1.0.0

        Signed-off-by: Adam Staveley <[email protected]>

    * exclude test from build step in readme

        Signed-off-by: Adam Staveley <[email protected]>

    Approved-by: Arzon Barua <[email protected]>

* bitbucket-pipelines.yml edited online with Bitbucket

* fix whitelist and rename enableWhitelist to block-all

    Signed-off-by: Adam Staveley <[email protected]>

* small README fixes

    Signed-off-by: Adam Staveley <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working trivial
Projects
None yet
Development

No branches or pull requests

1 participant