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 - Remove Development Mode on Certs Creation #1908

Merged
merged 2 commits into from
Oct 18, 2023

Conversation

rodneyosodo
Copy link
Member

@rodneyosodo rodneyosodo commented Sep 14, 2023

This commit ensures that the correct mode is set based on the value of MF_CERTS_VAULT_HOST.

What does this do?

Remove documentation for development mode. Since we only support PKI mode. I have created an issue to work on development mode.

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

No issue

List any changes that modify/break current functionality

Previously, the MF_CERTS_VAULT_HOST environment variable was being checked, resulting in incorrect behaviour when issuing certificates in development mode as we need a valid host.https://github.com/mainflux/mainflux/blob/65b63742354b9ad91f5ab6ac6bb74b6481311db8/cmd/certs/main.go#L89C1-L93C3

Have you included tests for your changes?

No

Did you document any new/modified functionality?

Yes

Notes

Linked to https://github.com/ultravioletrs/issues/issues/314 absmach/magistrala-docs#161

@codecov
Copy link

codecov bot commented Sep 14, 2023

Codecov Report

Merging #1908 (f83a172) into master (28f4965) will not change coverage.
Report is 9 commits behind head on master.
The diff coverage is n/a.

❗ Current head f83a172 differs from pull request most recent head e9ed2e3. Consider uploading reports for the commit e9ed2e3 to get more accurate results

@@           Coverage Diff           @@
##           master    #1908   +/-   ##
=======================================
  Coverage   67.14%   67.14%           
=======================================
  Files         120      120           
  Lines        9145     9145           
=======================================
  Hits         6140     6140           
  Misses       2368     2368           
  Partials      637      637           

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

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

This commit removes certificate creation in development mode. Previously, the `MF_CERTS_VAULT_HOST` environment variable was not being properly checked, resulting in incorrect behavior when issuing certificates. This commit ensures that the correct mode is set based on the value of `MF_CERTS_VAULT_HOST`.

Signed-off-by: Rodney Osodo <socials@rodneyosodo.com>
The README.md file has been updated to clarify the process of revoking certificates. The previous instructions were incorrect, and the correct method is now provided. The certificates can be revoked using the `certs` service by providing the `thing_id` of the thing for which the certificate was issued.

```
curl -s -S -X DELETE http://localhost:9019/certs/revoke -H "Authorization: Bearer $TOK" -H 'Content-Type: application/json' -d '{"thing_id":"c30b8842-507c-4bcd-973c-74008cef3be5"}'
```

Signed-off-by: Rodney Osodo <socials@rodneyosodo.com>
@drasko drasko merged commit 687505c into absmach:master Oct 18, 2023
1 of 2 checks passed
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