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

Create REST API for administering the bot #32

Closed
gazbert opened this issue Aug 29, 2016 · 5 comments
Closed

Create REST API for administering the bot #32

gazbert opened this issue Aug 29, 2016 · 5 comments
Assignees

Comments

@gazbert
Copy link
Owner

gazbert commented Aug 29, 2016

Create a REST API for managing the bot.

The initial release will support:

  • Configuring the bot.
  • Restarting the bot.
  • Fetching the bot logs.

It will be secured using TLS and JWT.

It will be documented using Swagger.

It will be consumed by BX-bot UI (#101) and 3rd party apps.

Later releases will support:

  • Fetching metrics for stuff like CPU, memory, disk, and JVM stats.
@gazbert gazbert self-assigned this Aug 29, 2016
gazbert added a commit that referenced this issue Sep 10, 2016
Merging in more REST API functionality for #32
This was referenced Sep 16, 2016
@gazbert
Copy link
Owner Author

gazbert commented Sep 16, 2016

Still to do:

  • Endpoint to to start|stop|status the bot
  • OAuth2 security: Keystores, credentials, etc...
  • Audit/access logging

@gazbert
Copy link
Owner Author

gazbert commented Aug 26, 2017

Still ToDo:

  1. New Runtime endpoint to: start|stop|status the bot, fetch/tail/download bot log, fetch bot resource usage, e.g. memory, cpu, disk.
  2. Make a decision on whether REST API should expose sensitive API keys/secrets for Exchange config... Same too for the Email Alerts config SMTP account password. Currently, it does not. These are things that users would not change very often - I'm thinking these config items should never leave the bot node? Nervous a bug in my (JWT/HTTPS) implementation could leak someone's API creds... Or someone spins up the bot/UI without configuring TLS... Or am I just being paranoid? ;-)

@gazbert gazbert mentioned this issue Feb 9, 2018
@gazbert gazbert pinned this issue May 12, 2019
@gazbert gazbert unpinned this issue May 12, 2019
@gazbert gazbert pinned this issue May 18, 2019
@gazbert gazbert unpinned this issue May 18, 2019
@gazbert gazbert added this to the REST API Release milestone May 18, 2019
@gazbert gazbert pinned this issue May 27, 2019
gazbert added a commit that referenced this issue May 27, 2019
gazbert added a commit that referenced this issue Jun 1, 2019
gazbert added a commit that referenced this issue Jun 2, 2019
@gazbert gazbert unpinned this issue Jun 15, 2019
gazbert added a commit that referenced this issue Mar 23, 2020
... or rather they just started working again after the dependency
updates! ;-o
gazbert added a commit that referenced this issue Mar 23, 2020
gazbert added a commit that referenced this issue Mar 23, 2020
gazbert added a commit that referenced this issue Mar 26, 2020
gazbert added a commit that referenced this issue Mar 26, 2020
gazbert added a commit that referenced this issue Mar 27, 2020
gazbert added a commit that referenced this issue Mar 28, 2020
gazbert added a commit that referenced this issue Mar 28, 2020
gazbert added a commit that referenced this issue Mar 30, 2020
gazbert added a commit that referenced this issue Mar 30, 2020
@gazbert
Copy link
Owner Author

gazbert commented Mar 30, 2020

Sonar issues need fixing then ready to go... finally!

gazbert added a commit that referenced this issue Apr 1, 2020
gazbert added a commit that referenced this issue Apr 2, 2020
gazbert added a commit that referenced this issue Apr 3, 2020
gazbert added a commit that referenced this issue Apr 3, 2020
gazbert added a commit that referenced this issue Apr 3, 2020
gazbert added a commit that referenced this issue Apr 3, 2020
* #32 : Reset Travis badge link

* #32 : More work on REST API security

* Moved security code out of v1 package hierarchy.
* Added database model + SQL.
* Reduced INFO logging in Maven build output.

* #32 : Added JWT user service and factory class

* #32 : Added JWT utils class

* #32 : Added JWT authentication request and response

* #32 : Added JWT AuthenticationEntryPoint

* #32 : Added JWT Authentication filter

* #32 : Fixed broken test for JWT Authentication filter

* #32 : Removed unused annotation

* #32 : Added Authentication Controller

* #32 : Wired up JWT authentication for Email Alerts config endpoint

TODO:
* Rest of controllers need updating.
* Add tests for RBAC on mutating ops.
* Sanitise properties.

* #32 : Typos n polish

* #32 : Wired up JWT authentication for remaining config endpoints

TODO:
* Add tests for RBAC on mutating ops.
* Sanitise properties.

* #32 : Wired up JWT authentication for runtime endpoints

TODO:
* Add tests for RBAC on mutating ops.
* Sanitise properties.

* #32 : Added tests for RBAC on mutating ops

TODO:
* Fix getUsername() NPE.
* Fix Gradle build.
* Sanitise properties.
* Swagger API docs.
* README updates.

* #32 : Fixed getUsername() NPE in controller log statements

TODO:
* Fix Gradle build.
* Sanitise properties.
* Swagger API docs.
* README updates.

* #32 : Fixed getUsername() NPE in controller log statements

TODO:
* Fix Gradle build.
* Sanitise properties.
* Swagger API docs.
* README updates.

* #32 : Fixed Gradle build

TODO:
* Swagger API docs.
* Sanitise app config properties.
* README updates.

* #32 : Fixed some Sonar issues

TODO:
* Swagger API docs.
* Sanitise app config properties.
* README updates.

* #32 : Fixed a few more Sonar issues

TODO:
* Swagger API docs.
* Sanitise app config properties.
* README updates.

* #32 : Started work on Swagger docs

* #32 : Some class renaming + config init checks

* #32 : Cleanup of Swagger docs

TODO:
* Update Gradle build
* Add authentication to Swagger UI
* README updates
* Fix Sonar issues

* #32 : Started introducing some JBehave BDD tests

* #32 : Started introducing some JBehave BDD tests - POM cleanup

* #32 : More JBehave BDD tests

* #32 : Cleanup of JBehave tests

* #32 : Added more JBehave BDD tests + code cleanup

* #32 : Removed commented out code

* #32 : Don't skip rest of JBehave tests after first failure

* #32 : README updates for using REST API

* #32 : More README updates for using REST API

* #32 : Added Authorize button to Swagger docs for trying endpoints

* #32 : Set token expires time to 10 mins + doc updates

* #32 : Fixed checkstyle errors

* #32 : Fixed some Sonar issues

* #32 : Fixed some Sonar issues

* #32 : Minor README updates

* #32 : Attempt to fix Sonar coverage

* #32 : Fix path to XML JaCoco reports

* #32 : Still trying to fix generation of Sonar coverage reports...

* #32 : Still trying to fix generation of Sonar coverage reports...

* #32 : Pin-pointing fix for creating Sonar coverage reports

* #32 : Pin-pointing fix for creating Sonar coverage reports

* #32 : Pin-pointing fix for creating Sonar coverage reports

* #32 : Pin-pointing fix for creating Sonar coverage reports

* #32 : FIXED - creating Sonar coverage reports

* #32 : Fixed some Sonar issues

* #32 : Fixed checkstyle issue

* #32 : Cleanup of Swagger docs

* #32 : Fixed more Sonar issues

* #32 : Some inspiration

* #32 : Some inspiration

* #32 : REST API README updates

* #32 : REST API README section tweaks

* #32 : Increased unit test coverage. Gradle build needs fixing

* #32 : Started fixing Gradle build - more to come ;-/

* #32 : Removed JBehave stuff - moved to new repo.

* #32 : Disabled REST Controller tests temporarily in Gradle

For some reason, they've started failing in Gradle build.
Work fine in maven and IDE. Needs investigating...

* #32 : Dependency updates for maven build

* #32 : Dependency updates for maven build - missed a couple

* #32 : Dependency updates for Gradle build

* #32 : Fixed REST API tests in Gradle

... or rather they just started working again after the dependency
updates! ;-o

* #32 : Fixed Sonar issue

* #32 : Fixed broken test

* #32 : Include unit tests in checkstyle checks

* #32 : Added maven checkstyle reports

* #32 : Disabled OKCoin IT test - v1 API no longer available.

OKCoin adapter needs updating.

* #32 : Removed bdd profile

* #32 : Added missing boot starters to parent pom

* #32 : Gradle cleanup

* #32 : README updates

* #32 : Ignore REST API keystore

* #32 : Updated TLS docs

* #32 : Fixed more Sonar issues

* #32 : Fixed more Sonar issues

* #32 : Using correct naming convention

* #32 : Revert last change

* #32 : Fixed checkstyle issue
gazbert added a commit that referenced this issue Apr 4, 2020
gazbert added a commit that referenced this issue Apr 4, 2020
gazbert added a commit that referenced this issue Apr 4, 2020
See: swagger-api/swagger-core#2979 and
springfox/springfox#2265

Upgrading to swagger-models 1.5.21 is the long term fix.
@gazbert
Copy link
Owner Author

gazbert commented Apr 4, 2020

Released.

@gazbert gazbert closed this as completed Apr 4, 2020
@gazbert gazbert unpinned this issue Apr 4, 2020
gazbert added a commit that referenced this issue Apr 4, 2020
gazbert added a commit that referenced this issue Apr 4, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant