Skip to content

Port CTIA to Trapperkeeper #924

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

Closed
wants to merge 372 commits into from

Conversation

frenchy64
Copy link
Contributor

@frenchy64 frenchy64 commented Jul 17, 2020

Related https://github.com/threatgrid/iroh/issues/3986

  • add :services entry to ESConnState in clj-momo to share service function with ES stores (for porting get-access-control to get-in-config)
  • make a get-in-config service that's compatible with fixtures before splitting PRs
  • how does pinning the cheshire version interact with the recent jackson-databind pinned version?
  • who is in charge of shutdown on JVM exit signal? should ctia.shutdown be its own service? do we need to replace the thread join in ctia.main?
  • ensure we always call shutdown-agents when needed
  • double check IEncryption is added to :services map when needed
  • consider if ctia-server-service can be refactored to just provide routes to the TK built-in jetty service

Tentative order of PR's:

  • fix short-id->entity-type properties bug
  • "transform" properties test helpers
  • realize-fn wrappers
  • routes changes
  • graphql changes
  • tk port

§ Actual PRs

  1. TK1.1 Seed routes with global services map argument (under review) TK1.1: Seed routes with global services map argument #945
  2. TK2.1 use services map in bulk (depends on TK1) TK2.1: use services map in bulk #950
  1. TK2.5 add service args to ctia.bundle.core (depends on TK2) TK2.5: add service args to ctia.bundle.core #954
  1. TK2.3: add service args to entity.event (depends on TK1.1) TK2.3: add service args to entity.event #952
  1. TK2.7 add services args to ctia.entity.feed (depends on TK1.1) TK2.7: add services args to ctia.entity.feed #956
  1. TK1.2 add service arguments to auth.threatgrid (no dependencies, under review) TK1.2: add service arguments to auth.threatgrid #948
  1. TK2.4: add services args to entity.incident (depends on TK1.1) TK2.4: add services args to entity.incident #953
  1. TK2.6 TK4.3: add services args to entity.casebook (depends on TK1.1) TK2.6: add services args to entity.casebook #955
  2. TK2.2 jwt (depends on TK1.1) TK2.2: add service args to auth.jwt #951
  3. TK2.8: add services args to observable routes TK2.8: add services args to observable routes #957
  4. TK2.9: add services arg to properties routes TK2.9: add services arg to properties routes #958
  5. TK2.10: add services args to version routes TK2.10: add services args to version routes #959
  6. TK2.11: add services args to entity.feedback routes TK2.11: add services args to entity.feedback routes #960
  7. TK2.12: add services args to entity.relationship routes TK2.12: add services args to entity.relationship routes #961
  8. TK2.15: Add services arg to entity-crud-routes TK2.15: Add services arg to entity-crud-routes #967
  9. TK3.1: add services args to flows.crud TK3.1: add services args to flows.crud #969 (depends on TK2.15)
  10. TK3.2: add services args to graphql routes TK3.2: add services args to graphql routes #970
  11. TK3.3: add service args to event hooks.event-hooks TK3.3: add service args to hooks.event-hooks #971
  12. TK3.4: add service args to get-http-show TK3.4: add service args to get-http-show #972
  13. TK3.5: add service args to get-access-control TK3.5: add service args to get-access-control #975
  14. TK3.6: add service args to list-all-pages TK3.6: add service args to list-all-pages #974
  15. TK3.7: misc TK3.7: misc #973
  16. TK3.8: change config "before" app starts in access-control-test TK3.8: change config "before" app starts in access-control-test #976
  17. TK3.9: add service args to ESConnState TK3.9: add service args to ESConnState #984
  18. TK3.10: get-in-config in migration tests, better resource management TK3.10: get-in-config in migration tests, better resource management #986
  19. TK3.11 misc TK prep for tests TK3.11 misc TK prep for tests #988
  20. TK3.11: Hooks service TK3.11: Hooks service #989
  21. TK3.12: GraphQL resolvers TK3.12: GraphQL realize-fn #990
  22. Use fake TK app over global state several tests Use fake TK app over global state several tests #994
  23. Introduce trapperkeeper and port IAuth service Introduce trapperkeeper and port IAuth service #995
  24. Port remaining 10 services to Trapperkeeper Port remaining 10 services to Trapperkeeper #997

§ QA

No QA is needed.

§ Release Notes

intern: one-line description for internal eyes only.
public: one line description for public release notes.

§ Squashed Commits

@frenchy64 frenchy64 self-assigned this Jul 17, 2020
@frenchy64 frenchy64 changed the title [WIP] Trapperkeeper init/shutdown proof-of-concept Proof-of-concept: Port IAuth service to Trapperkeeper Jul 20, 2020
@gbuisson
Copy link
Contributor

Nice! that looks very promising Ambrose, using this approach looks very straightforward, I think you should go on and convert all services init to see how it goes, you might run into issues with the store aspect as it allows multiple store instances for a given store type, but this is a feature that we never used and we should ditch that in the process: https://github.com/threatgrid/ctia/blob/master/src/ctia/store.clj#L32

@frenchy64
Copy link
Contributor Author

Checkpoint: c9178ce ports auth and encryption services to TK.

@frenchy64 frenchy64 changed the title Proof-of-concept: Port IAuth service to Trapperkeeper Port CTIA to Trapperkeeper Jul 24, 2020
@frenchy64 frenchy64 force-pushed the iroh-3986-tk-init branch 2 times, most recently from 5112a06 to 67019d5 Compare July 24, 2020 21:37
frenchy64 added a commit that referenced this pull request Jul 30, 2020
Related advthreat/iroh#3986

This PR encapsulates the global properties atom to help enable future refactorings, such as to Trapper Keeper's get-in-config.

Also fixes miscellaneous small issues.

Extracted from #924

§ QA
No QA is needed.

§ Release Notes
intern: Encapsulate global properties atom
§ Squashed Commits
@frenchy64 frenchy64 force-pushed the iroh-3986-tk-init branch 4 times, most recently from 77e60c4 to 492717c Compare August 14, 2020 22:22
@frenchy64 frenchy64 closed this Sep 29, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants