Skip to content

VC-39644 Collect info for the venafiConnection and more issuers #648

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

Merged
merged 1 commit into from
Apr 30, 2025

Conversation

Fatme
Copy link
Contributor

@Fatme Fatme commented Apr 29, 2025

This PR updates the Kubernetes agent by extending its resource collection capabilities. The newly supported resources include:

  • Venafi Connection
  • Smallstep Issuer
  • Cloudflare Origin CA
  • FreeIPA Issuer
  • EJBCA Issuer

@Fatme Fatme merged commit e8888e5 into master Apr 30, 2025
2 checks passed
@wallrj wallrj requested a review from Copilot April 30, 2025 15:37
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR extends the Kubernetes agent's resource collection capabilities to support additional issuers and the Venafi connection.

  • Adds new RBAC definitions for Venafi Connection, Smallstep Issuer, Cloudflare Origin CA, FreeIPA Issuer, and EJBCA Issuer.
  • Updates the configuration map to include dynamic resource configurations for the newly supported resources.

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
deploy/charts/venafi-kubernetes-agent/templates/rbac.yaml New ClusterRoles and ClusterRoleBindings for managing access to the various resource types.
deploy/charts/venafi-kubernetes-agent/templates/configmap.yaml Added k8s-dynamic resource definitions for Venafi Connection, Smallstep Issuer, Cloudflare Origin CA, FreeIPA Issuer, and EJBCA Issuer.
Comments suppressed due to low confidence (2)

deploy/charts/venafi-kubernetes-agent/templates/rbac.yaml:433

  • [nitpick] The name 'keyfactor-reader' might be confusing given that the group is 'ejbca-issuer.keyfactor.com'. Consider renaming it to 'ejbca-reader' for clarity, if that accurately reflects its purpose.
name: {{ include "venafi-kubernetes-agent.fullname" . }}-keyfactor-reader

deploy/charts/venafi-kubernetes-agent/templates/configmap.yaml:261

  • [nitpick] Consider using a consistent naming convention by adding a hyphen (e.g., 'k8s/freeipa-issuers') to align with the naming patterns used for the other issuer resources.
name: "k8s/freeipaissuers"

@wallrj
Copy link
Member

wallrj commented Apr 30, 2025

I ran the E2E test script (it has to be run manually for the time being. Everything seemed to work fine. Here's some of the output:

$ ./hack/e2e/test.sh
...
{
  "ts": 1746026521238.1619,
  "caller": "agent/run.go:59",
  "msg": "Starting",
  "v": 0,
  "logger": "Run",
  "version": "v2.2.0",
  "commit": "5fcaddb5baaca255370ce6a324d4ce33da4aee65"
}
...
{
  "ts": 1746026526318.8345,
  "caller": "agent/run.go:234",
  "msg": "Skipping datagatherers for CRDs that can't be found in Kubernetes",
  "v": 0,
  "logger": "Run",
  "datagatherers": [
    "k8s/googlecasissuers",
    "k8s/googlecasclusterissuers",
    "k8s/awspcaissuer",
    "k8s/awspcaclusterissuers",
    "k8s/gateways",
    "k8s/virtualservices",
    "k8s/routes",
    "k8s/fireflyissuers",
    "k8s/stepissuers",
    "k8s/stepclusterissuers",
    "k8s/originissuers",
    "k8s/clusteroriginissuers",
    "k8s/freeipaissuers",
    "k8s/freeipaclusterissuers",
    "k8s/ejbcaissuers",
    "k8s/ejbcaclusterissuers"
  ]
}
...
{
  "ts": 1746026526319.2183,
  "caller": "agent/run.go:368",
  "msg": "Successfully gathered",
  "v": 1,
  "logger": "Run.gatherAndOutputData.gatherData",
  "count": 1,
  "name": "k8s/venaficonnections"
}
...
{"ts":1746026526877.3396,"caller":"agent/run.go:413","msg":"Data sent successfully","v":0,"logger":"Run.gatherAndOutputData.postData"}
...

{
  "count": 1,
  "certificates": [
    {
      "id": "056e5ac0-25d7-11f0-841a-3dd10aaac079",
      "companyId": "9a0cab61-2b00-11ee-ba09-0733b0fe5adc",
      "managedCertificateId": "058751ec-25d7-11f0-861e-72e57cd9bcef",
      "fingerprint": "785EFFF03320FA9E310E9524C12A3B9ABB0B1944",
      "certificateName": "venafi-kubernetes-agent-e2e.b114b9d9-eebc-470c-8f41-85dbaebc72f1",
      "issuerCertificateIds": [],
      "certificateStatus": "ACTIVE",
      "modificationDate": "2025-04-30T15:23:09.957+00:00",
      "validityStart": "2025-04-30T15:22:23.000+00:00",
      "validityEnd": "2026-04-30T15:22:23.000+00:00",
      "selfSigned": true,
      "signatureAlgorithm": "SHA256_WITH_RSA_ENCRYPTION",
      "signatureHashAlgorithm": "SHA256",
      "encryptionType": "RSA",
      "keyStrength": 2048,
      "subjectKeyIdentifierHash": "18BEB3F69636AA94B2542D408ECF3ADC5F4D9D3F",
      "authorityKeyIdentifierHash": "18BEB3F69636AA94B2542D408ECF3ADC5F4D9D3F",
      "serialNumber": "38B639A35F30226E58B839ACC761989203683EAE",
      "subjectDN": "cn=venafi-kubernetes-agent-e2e.b114b9d9-eebc-470c-8f41-85dbaebc72f1",
      "subjectCN": [
        "venafi-kubernetes-agent-e2e.b114b9d9-eebc-470c-8f41-85dbaebc72f1"
      ],
      "subjectAlternativeNamesByType": {
        "otherName": [],
        "rfc822Name": [],
        "dNSName": [],
        "x400Address": [],
        "directoryName": [],
        "ediPartyName": [],
        "uniformResourceIdentifier": [],
        "iPAddress": [],
        "registeredID": []
      },
      "issuerDN": "cn=venafi-kubernetes-agent-e2e.b114b9d9-eebc-470c-8f41-85dbaebc72f1",
      "issuerCN": [
        "venafi-kubernetes-agent-e2e.b114b9d9-eebc-470c-8f41-85dbaebc72f1"
      ],
      "ocspNoCheck": false,
      "versionType": "CURRENT",
      "totalInstanceCount": 1,
      "totalActiveInstanceCount": 0,
      "instances": [],
      "ownership": {}
    }
  ]
}
+ exit 0

@wallrj wallrj deleted the fz/collect-new-issuers branch April 30, 2025 15:48
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.

3 participants