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

NOISSUE - Return certs on bootstrap view response #1855

Merged
merged 17 commits into from
Jul 31, 2023

Conversation

SammyOina
Copy link
Contributor

@SammyOina SammyOina commented Jul 7, 2023

What does this do?

  • Retrieves Client_Cert, and CA_Cert when a view request is made on the bootstrap service.
  • Returns certs on updateCert
  • Use named parameters on queries

Which issue(s) does this PR fix/relate to?

No issue

List any changes that modify/break current functionality

Have you included tests for your changes?

Did you document any new/modified functionality?

I have added modified parameters to openapi spec

Notes

@SammyOina SammyOina requested a review from a team as a code owner July 7, 2023 14:21
bootstrap/postgres/configs.go Outdated Show resolved Hide resolved
@codecov
Copy link

codecov bot commented Jul 7, 2023

Codecov Report

Merging #1855 (235364e) into master (57d47fe) will decrease coverage by 0.22%.
The diff coverage is 59.55%.

@@            Coverage Diff             @@
##           master    #1855      +/-   ##
==========================================
- Coverage   67.34%   67.12%   -0.22%     
==========================================
  Files         119      119              
  Lines        9411     9491      +80     
==========================================
+ Hits         6338     6371      +33     
- Misses       2402     2448      +46     
- Partials      671      672       +1     
Files Changed Coverage Δ
bootstrap/api/transport.go 94.47% <ø> (ø)
bootstrap/redis/producer/streams.go 56.41% <0.00%> (-0.49%) ⬇️
pkg/sdk/go/bootstrap.go 0.00% <0.00%> (ø)
pkg/sdk/go/sdk.go 74.41% <ø> (ø)
bootstrap/postgres/configs.go 70.16% <76.56%> (+0.87%) ⬆️
bootstrap/service.go 80.54% <90.47%> (+0.08%) ⬆️
bootstrap/api/endpoint.go 100.00% <100.00%> (ø)
bootstrap/api/responses.go 100.00% <100.00%> (ø)
bootstrap/reader.go 78.37% <100.00%> (ø)
bootstrap/redis/producer/events.go 54.09% <100.00%> (ø)

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

provision/service.go Outdated Show resolved Hide resolved
bootstrap/service_test.go Outdated Show resolved Hide resolved
dborovcanin
dborovcanin previously approved these changes Jul 11, 2023
drasko
drasko previously approved these changes Jul 11, 2023
Copy link
Contributor

@drasko drasko left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

dborovcanin
dborovcanin previously approved these changes Jul 12, 2023
Copy link
Collaborator

@dborovcanin dborovcanin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please fix CI remarks.

dborovcanin
dborovcanin previously approved these changes Jul 17, 2023
bootstrap/configs.go Outdated Show resolved Hide resolved
@arvindh123
Copy link
Contributor

@SammyOina
There is an other PR , which changes the flow of Bootstrap & Certs
https://github.com/mainflux/mainflux/pull/1669
https://github.com/ultravioletrs/issues/issues/124

@SammyOina
Copy link
Contributor Author

@SammyOina There is an other PR , which changes the flow of Bootstrap & Certs #1669 ultravioletrs/issues#124

I see but I don't expect them to clash

Signed-off-by: SammyOina <sammyoina@gmail.com>
Signed-off-by: SammyOina <sammyoina@gmail.com>
Signed-off-by: SammyOina <sammyoina@gmail.com>
Signed-off-by: SammyOina <sammyoina@gmail.com>
Signed-off-by: SammyOina <sammyoina@gmail.com>
Signed-off-by: SammyOina <sammyoina@gmail.com>
Signed-off-by: SammyOina <sammyoina@gmail.com>
Signed-off-by: SammyOina <sammyoina@gmail.com>
Signed-off-by: SammyOina <sammyoina@gmail.com>
Signed-off-by: SammyOina <sammyoina@gmail.com>
Signed-off-by: SammyOina <sammyoina@gmail.com>
Signed-off-by: SammyOina <sammyoina@gmail.com>
remove unrequired conditions

Signed-off-by: SammyOina <sammyoina@gmail.com>
Signed-off-by: SammyOina <sammyoina@gmail.com>
rename MFThing to ThingID
rename MFKey to ThingKey
rename mainflux_key to thing_key

Signed-off-by: SammyOina <sammyoina@gmail.com>
Signed-off-by: SammyOina <sammyoina@gmail.com>
Signed-off-by: SammyOina <sammyoina@gmail.com>
Copy link
Contributor

@drasko drasko left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@drasko drasko merged commit b7b14cc into absmach:master Jul 31, 2023
1 of 3 checks passed
rodneyosodo pushed a commit to rodneyosodo/magistrala that referenced this pull request Aug 3, 2023
* return certs on bootstrap view response

Signed-off-by: SammyOina <sammyoina@gmail.com>

* return updated certs when updated

Signed-off-by: SammyOina <sammyoina@gmail.com>

* fix test

Signed-off-by: SammyOina <sammyoina@gmail.com>

* fix test

Signed-off-by: SammyOina <sammyoina@gmail.com>

* fix test

Signed-off-by: SammyOina <sammyoina@gmail.com>

* fix test

Signed-off-by: SammyOina <sammyoina@gmail.com>

* fix tests

Signed-off-by: SammyOina <sammyoina@gmail.com>

* simplify tests

Signed-off-by: SammyOina <sammyoina@gmail.com>

* use named query

Signed-off-by: SammyOina <sammyoina@gmail.com>

* fix test

Signed-off-by: SammyOina <sammyoina@gmail.com>

* use named params

Signed-off-by: SammyOina <sammyoina@gmail.com>

* fix typo

Signed-off-by: SammyOina <sammyoina@gmail.com>

* use inline error checks
remove unrequired conditions

Signed-off-by: SammyOina <sammyoina@gmail.com>

* sort slices before comparison

Signed-off-by: SammyOina <sammyoina@gmail.com>

* rename mainflux_id to thing_id
rename MFThing to ThingID
rename MFKey to ThingKey
rename mainflux_key to thing_key

Signed-off-by: SammyOina <sammyoina@gmail.com>

* remove mainflux_channels

Signed-off-by: SammyOina <sammyoina@gmail.com>

* simplify unmarshaller

Signed-off-by: SammyOina <sammyoina@gmail.com>

---------

Signed-off-by: SammyOina <sammyoina@gmail.com>
WashingtonKK pushed a commit to WashingtonKK/magistrala that referenced this pull request Aug 4, 2023
* return certs on bootstrap view response

Signed-off-by: SammyOina <sammyoina@gmail.com>

* return updated certs when updated

Signed-off-by: SammyOina <sammyoina@gmail.com>

* fix test

Signed-off-by: SammyOina <sammyoina@gmail.com>

* fix test

Signed-off-by: SammyOina <sammyoina@gmail.com>

* fix test

Signed-off-by: SammyOina <sammyoina@gmail.com>

* fix test

Signed-off-by: SammyOina <sammyoina@gmail.com>

* fix tests

Signed-off-by: SammyOina <sammyoina@gmail.com>

* simplify tests

Signed-off-by: SammyOina <sammyoina@gmail.com>

* use named query

Signed-off-by: SammyOina <sammyoina@gmail.com>

* fix test

Signed-off-by: SammyOina <sammyoina@gmail.com>

* use named params

Signed-off-by: SammyOina <sammyoina@gmail.com>

* fix typo

Signed-off-by: SammyOina <sammyoina@gmail.com>

* use inline error checks
remove unrequired conditions

Signed-off-by: SammyOina <sammyoina@gmail.com>

* sort slices before comparison

Signed-off-by: SammyOina <sammyoina@gmail.com>

* rename mainflux_id to thing_id
rename MFThing to ThingID
rename MFKey to ThingKey
rename mainflux_key to thing_key

Signed-off-by: SammyOina <sammyoina@gmail.com>

* remove mainflux_channels

Signed-off-by: SammyOina <sammyoina@gmail.com>

* simplify unmarshaller

Signed-off-by: SammyOina <sammyoina@gmail.com>

---------

Signed-off-by: SammyOina <sammyoina@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants