mirror of
https://github.com/shankar0123/certctl.git
synced 2026-06-10 21:58:53 +00:00
Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 8b75e0311b |
+16
-16
@@ -30,22 +30,22 @@ import (
|
|||||||
"syscall"
|
"syscall"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/shankar0123/certctl/internal/connector/target"
|
"github.com/certctl-io/certctl/internal/connector/target"
|
||||||
"github.com/shankar0123/certctl/internal/connector/target/apache"
|
"github.com/certctl-io/certctl/internal/connector/target/apache"
|
||||||
"github.com/shankar0123/certctl/internal/connector/target/awsacm"
|
"github.com/certctl-io/certctl/internal/connector/target/awsacm"
|
||||||
"github.com/shankar0123/certctl/internal/connector/target/azurekv"
|
"github.com/certctl-io/certctl/internal/connector/target/azurekv"
|
||||||
"github.com/shankar0123/certctl/internal/connector/target/caddy"
|
"github.com/certctl-io/certctl/internal/connector/target/caddy"
|
||||||
"github.com/shankar0123/certctl/internal/connector/target/envoy"
|
"github.com/certctl-io/certctl/internal/connector/target/envoy"
|
||||||
"github.com/shankar0123/certctl/internal/connector/target/f5"
|
"github.com/certctl-io/certctl/internal/connector/target/f5"
|
||||||
"github.com/shankar0123/certctl/internal/connector/target/haproxy"
|
"github.com/certctl-io/certctl/internal/connector/target/haproxy"
|
||||||
"github.com/shankar0123/certctl/internal/connector/target/iis"
|
"github.com/certctl-io/certctl/internal/connector/target/iis"
|
||||||
jks "github.com/shankar0123/certctl/internal/connector/target/javakeystore"
|
jks "github.com/certctl-io/certctl/internal/connector/target/javakeystore"
|
||||||
k8s "github.com/shankar0123/certctl/internal/connector/target/k8ssecret"
|
k8s "github.com/certctl-io/certctl/internal/connector/target/k8ssecret"
|
||||||
"github.com/shankar0123/certctl/internal/connector/target/nginx"
|
"github.com/certctl-io/certctl/internal/connector/target/nginx"
|
||||||
pf "github.com/shankar0123/certctl/internal/connector/target/postfix"
|
pf "github.com/certctl-io/certctl/internal/connector/target/postfix"
|
||||||
sshconn "github.com/shankar0123/certctl/internal/connector/target/ssh"
|
sshconn "github.com/certctl-io/certctl/internal/connector/target/ssh"
|
||||||
"github.com/shankar0123/certctl/internal/connector/target/traefik"
|
"github.com/certctl-io/certctl/internal/connector/target/traefik"
|
||||||
wcs "github.com/shankar0123/certctl/internal/connector/target/wincertstore"
|
wcs "github.com/certctl-io/certctl/internal/connector/target/wincertstore"
|
||||||
)
|
)
|
||||||
|
|
||||||
// AgentConfig represents the agent-side configuration.
|
// AgentConfig represents the agent-side configuration.
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ import (
|
|||||||
"strings"
|
"strings"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"github.com/shankar0123/certctl/internal/cli"
|
"github.com/certctl-io/certctl/internal/cli"
|
||||||
)
|
)
|
||||||
|
|
||||||
// Bundle Q (L-001 closure): per-subcommand dispatch tests for cmd/cli/main.go.
|
// Bundle Q (L-001 closure): per-subcommand dispatch tests for cmd/cli/main.go.
|
||||||
|
|||||||
+1
-1
@@ -7,7 +7,7 @@ import (
|
|||||||
"os"
|
"os"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"github.com/shankar0123/certctl/internal/cli"
|
"github.com/certctl-io/certctl/internal/cli"
|
||||||
)
|
)
|
||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ import (
|
|||||||
|
|
||||||
gomcp "github.com/modelcontextprotocol/go-sdk/mcp"
|
gomcp "github.com/modelcontextprotocol/go-sdk/mcp"
|
||||||
|
|
||||||
"github.com/shankar0123/certctl/internal/mcp"
|
"github.com/certctl-io/certctl/internal/mcp"
|
||||||
)
|
)
|
||||||
|
|
||||||
// Version is set at build time via -ldflags.
|
// Version is set at build time via -ldflags.
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ import (
|
|||||||
"strings"
|
"strings"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"github.com/shankar0123/certctl/internal/api/router"
|
"github.com/certctl-io/certctl/internal/api/router"
|
||||||
)
|
)
|
||||||
|
|
||||||
// Bundle B / Audit M-002 (CWE-862): pin the dispatch-layer auth-exempt
|
// Bundle B / Audit M-002 (CWE-862): pin the dispatch-layer auth-exempt
|
||||||
|
|||||||
+21
-21
@@ -17,27 +17,27 @@ import (
|
|||||||
"syscall"
|
"syscall"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
acmepkg "github.com/shankar0123/certctl/internal/api/acme"
|
acmepkg "github.com/certctl-io/certctl/internal/api/acme"
|
||||||
"github.com/shankar0123/certctl/internal/api/handler"
|
"github.com/certctl-io/certctl/internal/api/handler"
|
||||||
"github.com/shankar0123/certctl/internal/api/middleware"
|
"github.com/certctl-io/certctl/internal/api/middleware"
|
||||||
"github.com/shankar0123/certctl/internal/api/router"
|
"github.com/certctl-io/certctl/internal/api/router"
|
||||||
"github.com/shankar0123/certctl/internal/config"
|
"github.com/certctl-io/certctl/internal/config"
|
||||||
discoveryawssm "github.com/shankar0123/certctl/internal/connector/discovery/awssm"
|
discoveryawssm "github.com/certctl-io/certctl/internal/connector/discovery/awssm"
|
||||||
discoveryazurekv "github.com/shankar0123/certctl/internal/connector/discovery/azurekv"
|
discoveryazurekv "github.com/certctl-io/certctl/internal/connector/discovery/azurekv"
|
||||||
discoverygcpsm "github.com/shankar0123/certctl/internal/connector/discovery/gcpsm"
|
discoverygcpsm "github.com/certctl-io/certctl/internal/connector/discovery/gcpsm"
|
||||||
notifyemail "github.com/shankar0123/certctl/internal/connector/notifier/email"
|
notifyemail "github.com/certctl-io/certctl/internal/connector/notifier/email"
|
||||||
notifyopsgenie "github.com/shankar0123/certctl/internal/connector/notifier/opsgenie"
|
notifyopsgenie "github.com/certctl-io/certctl/internal/connector/notifier/opsgenie"
|
||||||
notifypagerduty "github.com/shankar0123/certctl/internal/connector/notifier/pagerduty"
|
notifypagerduty "github.com/certctl-io/certctl/internal/connector/notifier/pagerduty"
|
||||||
notifyslack "github.com/shankar0123/certctl/internal/connector/notifier/slack"
|
notifyslack "github.com/certctl-io/certctl/internal/connector/notifier/slack"
|
||||||
notifyteams "github.com/shankar0123/certctl/internal/connector/notifier/teams"
|
notifyteams "github.com/certctl-io/certctl/internal/connector/notifier/teams"
|
||||||
"github.com/shankar0123/certctl/internal/crypto/signer"
|
"github.com/certctl-io/certctl/internal/crypto/signer"
|
||||||
"github.com/shankar0123/certctl/internal/domain"
|
"github.com/certctl-io/certctl/internal/domain"
|
||||||
"github.com/shankar0123/certctl/internal/ratelimit"
|
"github.com/certctl-io/certctl/internal/ratelimit"
|
||||||
"github.com/shankar0123/certctl/internal/repository/postgres"
|
"github.com/certctl-io/certctl/internal/repository/postgres"
|
||||||
"github.com/shankar0123/certctl/internal/scep/intune"
|
"github.com/certctl-io/certctl/internal/scep/intune"
|
||||||
"github.com/shankar0123/certctl/internal/scheduler"
|
"github.com/certctl-io/certctl/internal/scheduler"
|
||||||
"github.com/shankar0123/certctl/internal/service"
|
"github.com/certctl-io/certctl/internal/service"
|
||||||
"github.com/shankar0123/certctl/internal/trustanchor"
|
"github.com/certctl-io/certctl/internal/trustanchor"
|
||||||
)
|
)
|
||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
|
|||||||
@@ -10,10 +10,10 @@ import (
|
|||||||
"strings"
|
"strings"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"github.com/shankar0123/certctl/internal/api/middleware"
|
"github.com/certctl-io/certctl/internal/api/middleware"
|
||||||
"github.com/shankar0123/certctl/internal/api/router"
|
"github.com/certctl-io/certctl/internal/api/router"
|
||||||
"github.com/shankar0123/certctl/internal/config"
|
"github.com/certctl-io/certctl/internal/config"
|
||||||
"github.com/shankar0123/certctl/internal/service"
|
"github.com/certctl-io/certctl/internal/service"
|
||||||
)
|
)
|
||||||
|
|
||||||
// TestMain_HealthEndpointBypassesAuth verifies that health check endpoints
|
// TestMain_HealthEndpointBypassesAuth verifies that health check endpoints
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import (
|
|||||||
"strings"
|
"strings"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"github.com/shankar0123/certctl/internal/service"
|
"github.com/certctl-io/certctl/internal/service"
|
||||||
)
|
)
|
||||||
|
|
||||||
// fakeIssuerConn implements service.IssuerConnector enough for preflight tests.
|
// fakeIssuerConn implements service.IssuerConnector enough for preflight tests.
|
||||||
|
|||||||
@@ -28,7 +28,7 @@ import (
|
|||||||
"testing"
|
"testing"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/shankar0123/certctl/internal/deploy"
|
"github.com/certctl-io/certctl/internal/deploy"
|
||||||
)
|
)
|
||||||
|
|
||||||
// TestDeploy_Atomicity_FileIsAlwaysOldOrNew pins the load-bearing
|
// TestDeploy_Atomicity_FileIsAlwaysOldOrNew pins the load-bearing
|
||||||
|
|||||||
Binary file not shown.
@@ -1,3 +1,3 @@
|
|||||||
module github.com/shankar0123/certctl/deploy/test/f5-mock-icontrol
|
module github.com/certctl-io/certctl/deploy/test/f5-mock-icontrol
|
||||||
|
|
||||||
go 1.25.9
|
go 1.25.9
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
module github.com/shankar0123/certctl
|
module github.com/certctl-io/certctl
|
||||||
|
|
||||||
go 1.25.9
|
go 1.25.9
|
||||||
|
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
package acme
|
package acme
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"github.com/shankar0123/certctl/internal/domain"
|
"github.com/certctl-io/certctl/internal/domain"
|
||||||
)
|
)
|
||||||
|
|
||||||
// AccountResponseJSON is the wire shape RFC 8555 §7.1.2 mandates for
|
// AccountResponseJSON is the wire shape RFC 8555 §7.1.2 mandates for
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ import (
|
|||||||
"strings"
|
"strings"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/shankar0123/certctl/internal/domain"
|
"github.com/certctl-io/certctl/internal/domain"
|
||||||
)
|
)
|
||||||
|
|
||||||
// Phase 4 — RFC 9773 ACME Renewal Information.
|
// Phase 4 — RFC 9773 ACME Renewal Information.
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ import (
|
|||||||
|
|
||||||
jose "github.com/go-jose/go-jose/v4"
|
jose "github.com/go-jose/go-jose/v4"
|
||||||
|
|
||||||
"github.com/shankar0123/certctl/internal/domain"
|
"github.com/certctl-io/certctl/internal/domain"
|
||||||
)
|
)
|
||||||
|
|
||||||
// AllowedSignatureAlgorithms is the closed allow-list per RFC 8555 §6.2.
|
// AllowedSignatureAlgorithms is the closed allow-list per RFC 8555 §6.2.
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ import (
|
|||||||
|
|
||||||
jose "github.com/go-jose/go-jose/v4"
|
jose "github.com/go-jose/go-jose/v4"
|
||||||
|
|
||||||
"github.com/shankar0123/certctl/internal/domain"
|
"github.com/certctl-io/certctl/internal/domain"
|
||||||
)
|
)
|
||||||
|
|
||||||
// --- test fixtures + helpers --------------------------------------------
|
// --- test fixtures + helpers --------------------------------------------
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ import (
|
|||||||
"strings"
|
"strings"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/shankar0123/certctl/internal/domain"
|
"github.com/certctl-io/certctl/internal/domain"
|
||||||
)
|
)
|
||||||
|
|
||||||
// OrderResponseJSON is the wire shape RFC 8555 §7.1.3 mandates for the
|
// OrderResponseJSON is the wire shape RFC 8555 §7.1.3 mandates for the
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ import (
|
|||||||
|
|
||||||
jose "github.com/go-jose/go-jose/v4"
|
jose "github.com/go-jose/go-jose/v4"
|
||||||
|
|
||||||
"github.com/shankar0123/certctl/internal/domain"
|
"github.com/certctl-io/certctl/internal/domain"
|
||||||
)
|
)
|
||||||
|
|
||||||
// --- Test fixtures + helpers -------------------------------------------
|
// --- Test fixtures + helpers -------------------------------------------
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ import (
|
|||||||
|
|
||||||
"golang.org/x/sync/semaphore"
|
"golang.org/x/sync/semaphore"
|
||||||
|
|
||||||
"github.com/shankar0123/certctl/internal/validation"
|
"github.com/certctl-io/certctl/internal/validation"
|
||||||
)
|
)
|
||||||
|
|
||||||
// ChallengeValidator is the surface a challenge-validation worker
|
// ChallengeValidator is the surface a challenge-validation worker
|
||||||
|
|||||||
@@ -16,9 +16,9 @@ import (
|
|||||||
|
|
||||||
jose "github.com/go-jose/go-jose/v4"
|
jose "github.com/go-jose/go-jose/v4"
|
||||||
|
|
||||||
"github.com/shankar0123/certctl/internal/api/acme"
|
"github.com/certctl-io/certctl/internal/api/acme"
|
||||||
"github.com/shankar0123/certctl/internal/domain"
|
"github.com/certctl-io/certctl/internal/domain"
|
||||||
"github.com/shankar0123/certctl/internal/service"
|
"github.com/certctl-io/certctl/internal/service"
|
||||||
)
|
)
|
||||||
|
|
||||||
// MaxJWSBodyBytes caps the per-request JWS payload at 64 KiB. RFC 8555
|
// MaxJWSBodyBytes caps the per-request JWS payload at 64 KiB. RFC 8555
|
||||||
|
|||||||
@@ -17,9 +17,9 @@ import (
|
|||||||
|
|
||||||
jose "github.com/go-jose/go-jose/v4"
|
jose "github.com/go-jose/go-jose/v4"
|
||||||
|
|
||||||
"github.com/shankar0123/certctl/internal/api/acme"
|
"github.com/certctl-io/certctl/internal/api/acme"
|
||||||
"github.com/shankar0123/certctl/internal/domain"
|
"github.com/certctl-io/certctl/internal/domain"
|
||||||
"github.com/shankar0123/certctl/internal/service"
|
"github.com/certctl-io/certctl/internal/service"
|
||||||
)
|
)
|
||||||
|
|
||||||
// mockACMEService implements ACMEService for handler-level tests.
|
// mockACMEService implements ACMEService for handler-level tests.
|
||||||
|
|||||||
@@ -5,9 +5,9 @@ import (
|
|||||||
"net/http"
|
"net/http"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/shankar0123/certctl/internal/api/middleware"
|
"github.com/certctl-io/certctl/internal/api/middleware"
|
||||||
"github.com/shankar0123/certctl/internal/domain"
|
"github.com/certctl-io/certctl/internal/domain"
|
||||||
"github.com/shankar0123/certctl/internal/repository"
|
"github.com/certctl-io/certctl/internal/repository"
|
||||||
)
|
)
|
||||||
|
|
||||||
// AdminCRLCacheService is the slice of CRLCacheRepository the admin
|
// AdminCRLCacheService is the slice of CRLCacheRepository the admin
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ import (
|
|||||||
"strings"
|
"strings"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"github.com/shankar0123/certctl/internal/api/middleware"
|
"github.com/certctl-io/certctl/internal/api/middleware"
|
||||||
)
|
)
|
||||||
|
|
||||||
// fakeAdminCRLCacheService is the test stub for the
|
// fakeAdminCRLCacheService is the test stub for the
|
||||||
|
|||||||
@@ -7,8 +7,8 @@ import (
|
|||||||
"net/http"
|
"net/http"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/shankar0123/certctl/internal/api/middleware"
|
"github.com/certctl-io/certctl/internal/api/middleware"
|
||||||
"github.com/shankar0123/certctl/internal/service"
|
"github.com/certctl-io/certctl/internal/service"
|
||||||
)
|
)
|
||||||
|
|
||||||
// EST RFC 7030 hardening master bundle Phase 7.2 — admin observability
|
// EST RFC 7030 hardening master bundle Phase 7.2 — admin observability
|
||||||
|
|||||||
@@ -10,8 +10,8 @@ import (
|
|||||||
"testing"
|
"testing"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/shankar0123/certctl/internal/api/middleware"
|
"github.com/certctl-io/certctl/internal/api/middleware"
|
||||||
"github.com/shankar0123/certctl/internal/service"
|
"github.com/certctl-io/certctl/internal/service"
|
||||||
)
|
)
|
||||||
|
|
||||||
// EST RFC 7030 hardening master bundle Phase 7.4 — admin handler tests.
|
// EST RFC 7030 hardening master bundle Phase 7.4 — admin handler tests.
|
||||||
|
|||||||
@@ -7,8 +7,8 @@ import (
|
|||||||
"net/http"
|
"net/http"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/shankar0123/certctl/internal/api/middleware"
|
"github.com/certctl-io/certctl/internal/api/middleware"
|
||||||
"github.com/shankar0123/certctl/internal/service"
|
"github.com/certctl-io/certctl/internal/service"
|
||||||
)
|
)
|
||||||
|
|
||||||
// AdminSCEPIntuneService is the slice of the per-profile SCEPService set
|
// AdminSCEPIntuneService is the slice of the per-profile SCEPService set
|
||||||
|
|||||||
@@ -10,8 +10,8 @@ import (
|
|||||||
"testing"
|
"testing"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/shankar0123/certctl/internal/api/middleware"
|
"github.com/certctl-io/certctl/internal/api/middleware"
|
||||||
"github.com/shankar0123/certctl/internal/service"
|
"github.com/certctl-io/certctl/internal/service"
|
||||||
)
|
)
|
||||||
|
|
||||||
// fakeAdminSCEPIntuneService is the test stub for AdminSCEPIntuneService.
|
// fakeAdminSCEPIntuneService is the test stub for AdminSCEPIntuneService.
|
||||||
|
|||||||
@@ -30,7 +30,7 @@ import (
|
|||||||
"strings"
|
"strings"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"github.com/shankar0123/certctl/internal/domain"
|
"github.com/certctl-io/certctl/internal/domain"
|
||||||
)
|
)
|
||||||
|
|
||||||
// adversarialCSRInputs exercises the EST CSR parsing surface. None of these
|
// adversarialCSRInputs exercises the EST CSR parsing surface. None of these
|
||||||
|
|||||||
@@ -34,7 +34,7 @@ import (
|
|||||||
"strings"
|
"strings"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"github.com/shankar0123/certctl/internal/domain"
|
"github.com/certctl-io/certctl/internal/domain"
|
||||||
)
|
)
|
||||||
|
|
||||||
// adversarialPathInputs is the attack catalog shared by Tier 1A cases. Each
|
// adversarialPathInputs is the attack catalog shared by Tier 1A cases. Each
|
||||||
|
|||||||
@@ -27,8 +27,8 @@ import (
|
|||||||
"strings"
|
"strings"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"github.com/shankar0123/certctl/internal/domain"
|
"github.com/certctl-io/certctl/internal/domain"
|
||||||
"github.com/shankar0123/certctl/internal/repository"
|
"github.com/certctl-io/certctl/internal/repository"
|
||||||
)
|
)
|
||||||
|
|
||||||
// buildListRequest constructs a GET /api/v1/certificates request with the
|
// buildListRequest constructs a GET /api/v1/certificates request with the
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ import (
|
|||||||
"net/http/httptest"
|
"net/http/httptest"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"github.com/shankar0123/certctl/internal/domain"
|
"github.com/certctl-io/certctl/internal/domain"
|
||||||
)
|
)
|
||||||
|
|
||||||
// MockAgentGroupService is a mock implementation of AgentGroupService interface.
|
// MockAgentGroupService is a mock implementation of AgentGroupService interface.
|
||||||
|
|||||||
@@ -4,13 +4,13 @@ import (
|
|||||||
"context"
|
"context"
|
||||||
"encoding/json"
|
"encoding/json"
|
||||||
"errors"
|
"errors"
|
||||||
"github.com/shankar0123/certctl/internal/repository"
|
"github.com/certctl-io/certctl/internal/repository"
|
||||||
"net/http"
|
"net/http"
|
||||||
"strconv"
|
"strconv"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"github.com/shankar0123/certctl/internal/api/middleware"
|
"github.com/certctl-io/certctl/internal/api/middleware"
|
||||||
"github.com/shankar0123/certctl/internal/domain"
|
"github.com/certctl-io/certctl/internal/domain"
|
||||||
)
|
)
|
||||||
|
|
||||||
// AgentGroupService defines the service interface for agent group operations.
|
// AgentGroupService defines the service interface for agent group operations.
|
||||||
|
|||||||
@@ -9,8 +9,8 @@ import (
|
|||||||
"testing"
|
"testing"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/shankar0123/certctl/internal/domain"
|
"github.com/certctl-io/certctl/internal/domain"
|
||||||
"github.com/shankar0123/certctl/internal/service"
|
"github.com/certctl-io/certctl/internal/service"
|
||||||
)
|
)
|
||||||
|
|
||||||
// MockAgentService is a mock implementation of AgentService interface.
|
// MockAgentService is a mock implementation of AgentService interface.
|
||||||
|
|||||||
@@ -8,8 +8,8 @@ import (
|
|||||||
"testing"
|
"testing"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/shankar0123/certctl/internal/domain"
|
"github.com/certctl-io/certctl/internal/domain"
|
||||||
"github.com/shankar0123/certctl/internal/service"
|
"github.com/certctl-io/certctl/internal/service"
|
||||||
)
|
)
|
||||||
|
|
||||||
// agentRetireTestSetup builds an AgentHandler with a mock AgentService whose
|
// agentRetireTestSetup builds an AgentHandler with a mock AgentService whose
|
||||||
|
|||||||
@@ -4,16 +4,16 @@ import (
|
|||||||
"context"
|
"context"
|
||||||
"encoding/json"
|
"encoding/json"
|
||||||
"errors"
|
"errors"
|
||||||
"github.com/shankar0123/certctl/internal/repository"
|
"github.com/certctl-io/certctl/internal/repository"
|
||||||
"log/slog"
|
"log/slog"
|
||||||
"net/http"
|
"net/http"
|
||||||
"strconv"
|
"strconv"
|
||||||
"strings"
|
"strings"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/shankar0123/certctl/internal/api/middleware"
|
"github.com/certctl-io/certctl/internal/api/middleware"
|
||||||
"github.com/shankar0123/certctl/internal/domain"
|
"github.com/certctl-io/certctl/internal/domain"
|
||||||
"github.com/shankar0123/certctl/internal/service"
|
"github.com/certctl-io/certctl/internal/service"
|
||||||
)
|
)
|
||||||
|
|
||||||
// AgentService defines the service interface for agent operations.
|
// AgentService defines the service interface for agent operations.
|
||||||
|
|||||||
@@ -6,8 +6,8 @@ import (
|
|||||||
"strconv"
|
"strconv"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"github.com/shankar0123/certctl/internal/api/middleware"
|
"github.com/certctl-io/certctl/internal/api/middleware"
|
||||||
"github.com/shankar0123/certctl/internal/domain"
|
"github.com/certctl-io/certctl/internal/domain"
|
||||||
)
|
)
|
||||||
|
|
||||||
// AuditService defines the service interface for audit event operations.
|
// AuditService defines the service interface for audit event operations.
|
||||||
|
|||||||
@@ -9,8 +9,8 @@ import (
|
|||||||
"testing"
|
"testing"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/shankar0123/certctl/internal/api/middleware"
|
"github.com/certctl-io/certctl/internal/api/middleware"
|
||||||
"github.com/shankar0123/certctl/internal/domain"
|
"github.com/certctl-io/certctl/internal/domain"
|
||||||
)
|
)
|
||||||
|
|
||||||
// mockAuditService implements AuditService for testing.
|
// mockAuditService implements AuditService for testing.
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ import (
|
|||||||
"net/http/httptest"
|
"net/http/httptest"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"github.com/shankar0123/certctl/internal/domain"
|
"github.com/certctl-io/certctl/internal/domain"
|
||||||
)
|
)
|
||||||
|
|
||||||
// Bundle C / Audit M-007 (CWE-754): partial-failure tests for the three
|
// Bundle C / Audit M-007 (CWE-754): partial-failure tests for the three
|
||||||
|
|||||||
@@ -6,9 +6,9 @@ import (
|
|||||||
"errors"
|
"errors"
|
||||||
"net/http"
|
"net/http"
|
||||||
|
|
||||||
"github.com/shankar0123/certctl/internal/api/middleware"
|
"github.com/certctl-io/certctl/internal/api/middleware"
|
||||||
"github.com/shankar0123/certctl/internal/domain"
|
"github.com/certctl-io/certctl/internal/domain"
|
||||||
"github.com/shankar0123/certctl/internal/service"
|
"github.com/certctl-io/certctl/internal/service"
|
||||||
)
|
)
|
||||||
|
|
||||||
// BulkReassignmentService defines the service interface for bulk
|
// BulkReassignmentService defines the service interface for bulk
|
||||||
|
|||||||
@@ -11,8 +11,8 @@ import (
|
|||||||
"strings"
|
"strings"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"github.com/shankar0123/certctl/internal/domain"
|
"github.com/certctl-io/certctl/internal/domain"
|
||||||
"github.com/shankar0123/certctl/internal/service"
|
"github.com/certctl-io/certctl/internal/service"
|
||||||
)
|
)
|
||||||
|
|
||||||
type mockBulkReassignmentService struct {
|
type mockBulkReassignmentService struct {
|
||||||
|
|||||||
@@ -5,8 +5,8 @@ import (
|
|||||||
"encoding/json"
|
"encoding/json"
|
||||||
"net/http"
|
"net/http"
|
||||||
|
|
||||||
"github.com/shankar0123/certctl/internal/api/middleware"
|
"github.com/certctl-io/certctl/internal/api/middleware"
|
||||||
"github.com/shankar0123/certctl/internal/domain"
|
"github.com/certctl-io/certctl/internal/domain"
|
||||||
)
|
)
|
||||||
|
|
||||||
// BulkRenewalService defines the service interface for bulk certificate
|
// BulkRenewalService defines the service interface for bulk certificate
|
||||||
|
|||||||
@@ -10,8 +10,8 @@ import (
|
|||||||
"strings"
|
"strings"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"github.com/shankar0123/certctl/internal/api/middleware"
|
"github.com/certctl-io/certctl/internal/api/middleware"
|
||||||
"github.com/shankar0123/certctl/internal/domain"
|
"github.com/certctl-io/certctl/internal/domain"
|
||||||
)
|
)
|
||||||
|
|
||||||
// mockBulkRenewalService is a test implementation of BulkRenewalService.
|
// mockBulkRenewalService is a test implementation of BulkRenewalService.
|
||||||
|
|||||||
@@ -5,8 +5,8 @@ import (
|
|||||||
"encoding/json"
|
"encoding/json"
|
||||||
"net/http"
|
"net/http"
|
||||||
|
|
||||||
"github.com/shankar0123/certctl/internal/api/middleware"
|
"github.com/certctl-io/certctl/internal/api/middleware"
|
||||||
"github.com/shankar0123/certctl/internal/domain"
|
"github.com/certctl-io/certctl/internal/domain"
|
||||||
)
|
)
|
||||||
|
|
||||||
// BulkRevocationService defines the service interface for bulk certificate revocation.
|
// BulkRevocationService defines the service interface for bulk certificate revocation.
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ import (
|
|||||||
"strings"
|
"strings"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"github.com/shankar0123/certctl/internal/domain"
|
"github.com/certctl-io/certctl/internal/domain"
|
||||||
)
|
)
|
||||||
|
|
||||||
// EST RFC 7030 hardening master bundle Phase 11.4 — BulkRevokeEST handler tests.
|
// EST RFC 7030 hardening master bundle Phase 11.4 — BulkRevokeEST handler tests.
|
||||||
|
|||||||
@@ -10,8 +10,8 @@ import (
|
|||||||
"strings"
|
"strings"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"github.com/shankar0123/certctl/internal/api/middleware"
|
"github.com/certctl-io/certctl/internal/api/middleware"
|
||||||
"github.com/shankar0123/certctl/internal/domain"
|
"github.com/certctl-io/certctl/internal/domain"
|
||||||
)
|
)
|
||||||
|
|
||||||
// mockBulkRevocationService is a test implementation of BulkRevocationService
|
// mockBulkRevocationService is a test implementation of BulkRevocationService
|
||||||
|
|||||||
@@ -18,9 +18,9 @@ import (
|
|||||||
|
|
||||||
"golang.org/x/crypto/ocsp"
|
"golang.org/x/crypto/ocsp"
|
||||||
|
|
||||||
"github.com/shankar0123/certctl/internal/api/middleware"
|
"github.com/certctl-io/certctl/internal/api/middleware"
|
||||||
"github.com/shankar0123/certctl/internal/domain"
|
"github.com/certctl-io/certctl/internal/domain"
|
||||||
"github.com/shankar0123/certctl/internal/repository"
|
"github.com/certctl-io/certctl/internal/repository"
|
||||||
)
|
)
|
||||||
|
|
||||||
// MockCertificateService is a mock implementation of CertificateService interface.
|
// MockCertificateService is a mock implementation of CertificateService interface.
|
||||||
|
|||||||
@@ -16,11 +16,11 @@ import (
|
|||||||
|
|
||||||
"golang.org/x/crypto/ocsp"
|
"golang.org/x/crypto/ocsp"
|
||||||
|
|
||||||
"github.com/shankar0123/certctl/internal/api/middleware"
|
"github.com/certctl-io/certctl/internal/api/middleware"
|
||||||
"github.com/shankar0123/certctl/internal/domain"
|
"github.com/certctl-io/certctl/internal/domain"
|
||||||
"github.com/shankar0123/certctl/internal/ratelimit"
|
"github.com/certctl-io/certctl/internal/ratelimit"
|
||||||
"github.com/shankar0123/certctl/internal/repository"
|
"github.com/certctl-io/certctl/internal/repository"
|
||||||
"github.com/shankar0123/certctl/internal/service"
|
"github.com/certctl-io/certctl/internal/service"
|
||||||
)
|
)
|
||||||
|
|
||||||
// CertificateService defines the service interface for certificate operations.
|
// CertificateService defines the service interface for certificate operations.
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ import (
|
|||||||
"strings"
|
"strings"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"github.com/shankar0123/certctl/internal/domain"
|
"github.com/certctl-io/certctl/internal/domain"
|
||||||
)
|
)
|
||||||
|
|
||||||
// EST RFC 7030 hardening master bundle Phase 10.3 — Cisco IOS quirk
|
// EST RFC 7030 hardening master bundle Phase 10.3 — Cisco IOS quirk
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ import (
|
|||||||
"net/http"
|
"net/http"
|
||||||
"strconv"
|
"strconv"
|
||||||
|
|
||||||
"github.com/shankar0123/certctl/internal/domain"
|
"github.com/certctl-io/certctl/internal/domain"
|
||||||
)
|
)
|
||||||
|
|
||||||
// DiscoveryService defines the interface used by the discovery handler.
|
// DiscoveryService defines the interface used by the discovery handler.
|
||||||
|
|||||||
@@ -10,8 +10,8 @@ import (
|
|||||||
"testing"
|
"testing"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/shankar0123/certctl/internal/api/middleware"
|
"github.com/certctl-io/certctl/internal/api/middleware"
|
||||||
"github.com/shankar0123/certctl/internal/domain"
|
"github.com/certctl-io/certctl/internal/domain"
|
||||||
)
|
)
|
||||||
|
|
||||||
// MockDiscoveryService is a mock implementation of DiscoveryService interface.
|
// MockDiscoveryService is a mock implementation of DiscoveryService interface.
|
||||||
|
|||||||
@@ -14,12 +14,12 @@ import (
|
|||||||
"net/http"
|
"net/http"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"github.com/shankar0123/certctl/internal/api/middleware"
|
"github.com/certctl-io/certctl/internal/api/middleware"
|
||||||
"github.com/shankar0123/certctl/internal/cms"
|
"github.com/certctl-io/certctl/internal/cms"
|
||||||
"github.com/shankar0123/certctl/internal/domain"
|
"github.com/certctl-io/certctl/internal/domain"
|
||||||
"github.com/shankar0123/certctl/internal/pkcs7"
|
"github.com/certctl-io/certctl/internal/pkcs7"
|
||||||
"github.com/shankar0123/certctl/internal/ratelimit"
|
"github.com/certctl-io/certctl/internal/ratelimit"
|
||||||
"github.com/shankar0123/certctl/internal/trustanchor"
|
"github.com/certctl-io/certctl/internal/trustanchor"
|
||||||
)
|
)
|
||||||
|
|
||||||
// ESTService defines the service interface for EST enrollment operations.
|
// ESTService defines the service interface for EST enrollment operations.
|
||||||
|
|||||||
@@ -18,8 +18,8 @@ import (
|
|||||||
"testing"
|
"testing"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/shankar0123/certctl/internal/domain"
|
"github.com/certctl-io/certctl/internal/domain"
|
||||||
"github.com/shankar0123/certctl/internal/pkcs7"
|
"github.com/certctl-io/certctl/internal/pkcs7"
|
||||||
)
|
)
|
||||||
|
|
||||||
// mockESTService implements ESTService for testing.
|
// mockESTService implements ESTService for testing.
|
||||||
|
|||||||
@@ -21,10 +21,10 @@ import (
|
|||||||
"testing"
|
"testing"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/shankar0123/certctl/internal/cms"
|
"github.com/certctl-io/certctl/internal/cms"
|
||||||
"github.com/shankar0123/certctl/internal/domain"
|
"github.com/certctl-io/certctl/internal/domain"
|
||||||
"github.com/shankar0123/certctl/internal/ratelimit"
|
"github.com/certctl-io/certctl/internal/ratelimit"
|
||||||
"github.com/shankar0123/certctl/internal/trustanchor"
|
"github.com/certctl-io/certctl/internal/trustanchor"
|
||||||
)
|
)
|
||||||
|
|
||||||
// EST RFC 7030 hardening master bundle Phases 2-4 tests.
|
// EST RFC 7030 hardening master bundle Phases 2-4 tests.
|
||||||
|
|||||||
@@ -18,8 +18,8 @@ import (
|
|||||||
"strings"
|
"strings"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"github.com/shankar0123/certctl/internal/domain"
|
"github.com/certctl-io/certctl/internal/domain"
|
||||||
"github.com/shankar0123/certctl/internal/pkcs7"
|
"github.com/certctl-io/certctl/internal/pkcs7"
|
||||||
)
|
)
|
||||||
|
|
||||||
// EST RFC 7030 hardening master bundle Phase 5.3 — serverkeygen tests.
|
// EST RFC 7030 hardening master bundle Phase 5.3 — serverkeygen tests.
|
||||||
|
|||||||
@@ -5,15 +5,15 @@ import (
|
|||||||
"encoding/json"
|
"encoding/json"
|
||||||
"errors"
|
"errors"
|
||||||
"fmt"
|
"fmt"
|
||||||
"github.com/shankar0123/certctl/internal/repository"
|
"github.com/certctl-io/certctl/internal/repository"
|
||||||
"log/slog"
|
"log/slog"
|
||||||
"net/http"
|
"net/http"
|
||||||
"strings"
|
"strings"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/shankar0123/certctl/internal/api/middleware"
|
"github.com/certctl-io/certctl/internal/api/middleware"
|
||||||
"github.com/shankar0123/certctl/internal/ratelimit"
|
"github.com/certctl-io/certctl/internal/ratelimit"
|
||||||
"github.com/shankar0123/certctl/internal/service"
|
"github.com/certctl-io/certctl/internal/service"
|
||||||
)
|
)
|
||||||
|
|
||||||
// ExportService defines the service interface for certificate export operations.
|
// ExportService defines the service interface for certificate export operations.
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ import (
|
|||||||
"strings"
|
"strings"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"github.com/shankar0123/certctl/internal/service"
|
"github.com/certctl-io/certctl/internal/service"
|
||||||
)
|
)
|
||||||
|
|
||||||
// Add context import was already there — verify import is present above
|
// Add context import was already there — verify import is present above
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ import (
|
|||||||
"net/http"
|
"net/http"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/shankar0123/certctl/internal/api/middleware"
|
"github.com/certctl-io/certctl/internal/api/middleware"
|
||||||
)
|
)
|
||||||
|
|
||||||
// HealthHandler handles health and readiness check endpoints.
|
// HealthHandler handles health and readiness check endpoints.
|
||||||
|
|||||||
@@ -7,8 +7,8 @@ import (
|
|||||||
"net/http"
|
"net/http"
|
||||||
"strconv"
|
"strconv"
|
||||||
|
|
||||||
"github.com/shankar0123/certctl/internal/domain"
|
"github.com/certctl-io/certctl/internal/domain"
|
||||||
"github.com/shankar0123/certctl/internal/repository"
|
"github.com/certctl-io/certctl/internal/repository"
|
||||||
)
|
)
|
||||||
|
|
||||||
// HealthCheckServicer defines the interface used by the health check handler.
|
// HealthCheckServicer defines the interface used by the health check handler.
|
||||||
|
|||||||
@@ -9,8 +9,8 @@ import (
|
|||||||
"net/http/httptest"
|
"net/http/httptest"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"github.com/shankar0123/certctl/internal/domain"
|
"github.com/certctl-io/certctl/internal/domain"
|
||||||
"github.com/shankar0123/certctl/internal/repository"
|
"github.com/certctl-io/certctl/internal/repository"
|
||||||
)
|
)
|
||||||
|
|
||||||
// mockHealthCheckSvc implements HealthCheckServicer for testing.
|
// mockHealthCheckSvc implements HealthCheckServicer for testing.
|
||||||
|
|||||||
@@ -9,8 +9,8 @@ import (
|
|||||||
"testing"
|
"testing"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
|
"github.com/certctl-io/certctl/internal/api/middleware"
|
||||||
_ "github.com/lib/pq" // Bundle-5 / H-006: postgres driver for /ready DB-probe regression test
|
_ "github.com/lib/pq" // Bundle-5 / H-006: postgres driver for /ready DB-probe regression test
|
||||||
"github.com/shankar0123/certctl/internal/api/middleware"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestHealth_ReturnsOK(t *testing.T) {
|
func TestHealth_ReturnsOK(t *testing.T) {
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ import (
|
|||||||
"testing"
|
"testing"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/shankar0123/certctl/internal/domain"
|
"github.com/certctl-io/certctl/internal/domain"
|
||||||
)
|
)
|
||||||
|
|
||||||
// MockIssuerService is a mock implementation of IssuerService interface.
|
// MockIssuerService is a mock implementation of IssuerService interface.
|
||||||
|
|||||||
@@ -4,14 +4,14 @@ import (
|
|||||||
"context"
|
"context"
|
||||||
"encoding/json"
|
"encoding/json"
|
||||||
"errors"
|
"errors"
|
||||||
"github.com/shankar0123/certctl/internal/repository"
|
"github.com/certctl-io/certctl/internal/repository"
|
||||||
"log/slog"
|
"log/slog"
|
||||||
"net/http"
|
"net/http"
|
||||||
"strconv"
|
"strconv"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"github.com/shankar0123/certctl/internal/api/middleware"
|
"github.com/certctl-io/certctl/internal/api/middleware"
|
||||||
"github.com/shankar0123/certctl/internal/domain"
|
"github.com/certctl-io/certctl/internal/domain"
|
||||||
)
|
)
|
||||||
|
|
||||||
// IssuerService defines the service interface for issuer operations.
|
// IssuerService defines the service interface for issuer operations.
|
||||||
|
|||||||
@@ -10,8 +10,8 @@ import (
|
|||||||
"testing"
|
"testing"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/shankar0123/certctl/internal/domain"
|
"github.com/certctl-io/certctl/internal/domain"
|
||||||
"github.com/shankar0123/certctl/internal/service"
|
"github.com/certctl-io/certctl/internal/service"
|
||||||
)
|
)
|
||||||
|
|
||||||
// MockJobService is a mock implementation of JobService interface.
|
// MockJobService is a mock implementation of JobService interface.
|
||||||
|
|||||||
@@ -4,15 +4,15 @@ import (
|
|||||||
"context"
|
"context"
|
||||||
"encoding/json"
|
"encoding/json"
|
||||||
"errors"
|
"errors"
|
||||||
"github.com/shankar0123/certctl/internal/repository"
|
"github.com/certctl-io/certctl/internal/repository"
|
||||||
"io"
|
"io"
|
||||||
"net/http"
|
"net/http"
|
||||||
"strconv"
|
"strconv"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"github.com/shankar0123/certctl/internal/api/middleware"
|
"github.com/certctl-io/certctl/internal/api/middleware"
|
||||||
"github.com/shankar0123/certctl/internal/domain"
|
"github.com/certctl-io/certctl/internal/domain"
|
||||||
"github.com/shankar0123/certctl/internal/service"
|
"github.com/certctl-io/certctl/internal/service"
|
||||||
)
|
)
|
||||||
|
|
||||||
// JobService defines the service interface for job operations.
|
// JobService defines the service interface for job operations.
|
||||||
|
|||||||
@@ -9,8 +9,8 @@ import (
|
|||||||
"strconv"
|
"strconv"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/shankar0123/certctl/internal/api/middleware"
|
"github.com/certctl-io/certctl/internal/api/middleware"
|
||||||
"github.com/shankar0123/certctl/internal/service"
|
"github.com/certctl-io/certctl/internal/service"
|
||||||
)
|
)
|
||||||
|
|
||||||
// MetricsService defines the service interface for metrics collection.
|
// MetricsService defines the service interface for metrics collection.
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ import (
|
|||||||
"fmt"
|
"fmt"
|
||||||
"net/http"
|
"net/http"
|
||||||
|
|
||||||
"github.com/shankar0123/certctl/internal/domain"
|
"github.com/certctl-io/certctl/internal/domain"
|
||||||
)
|
)
|
||||||
|
|
||||||
// NetworkScanService defines the interface used by the network scan handler.
|
// NetworkScanService defines the interface used by the network scan handler.
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ import (
|
|||||||
"net/http/httptest"
|
"net/http/httptest"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"github.com/shankar0123/certctl/internal/domain"
|
"github.com/certctl-io/certctl/internal/domain"
|
||||||
)
|
)
|
||||||
|
|
||||||
// mockNetworkScanService implements NetworkScanService for testing.
|
// mockNetworkScanService implements NetworkScanService for testing.
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ import (
|
|||||||
"testing"
|
"testing"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/shankar0123/certctl/internal/domain"
|
"github.com/certctl-io/certctl/internal/domain"
|
||||||
)
|
)
|
||||||
|
|
||||||
// MockNotificationService is a mock implementation of NotificationService interface.
|
// MockNotificationService is a mock implementation of NotificationService interface.
|
||||||
|
|||||||
@@ -3,13 +3,13 @@ package handler
|
|||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
"errors"
|
"errors"
|
||||||
"github.com/shankar0123/certctl/internal/repository"
|
"github.com/certctl-io/certctl/internal/repository"
|
||||||
"net/http"
|
"net/http"
|
||||||
"strconv"
|
"strconv"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"github.com/shankar0123/certctl/internal/api/middleware"
|
"github.com/certctl-io/certctl/internal/api/middleware"
|
||||||
"github.com/shankar0123/certctl/internal/domain"
|
"github.com/certctl-io/certctl/internal/domain"
|
||||||
)
|
)
|
||||||
|
|
||||||
// NotificationService defines the service interface for notification operations.
|
// NotificationService defines the service interface for notification operations.
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ import (
|
|||||||
"testing"
|
"testing"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/shankar0123/certctl/internal/domain"
|
"github.com/certctl-io/certctl/internal/domain"
|
||||||
)
|
)
|
||||||
|
|
||||||
// MockOwnerService is a mock implementation of OwnerService interface.
|
// MockOwnerService is a mock implementation of OwnerService interface.
|
||||||
|
|||||||
@@ -4,13 +4,13 @@ import (
|
|||||||
"context"
|
"context"
|
||||||
"encoding/json"
|
"encoding/json"
|
||||||
"errors"
|
"errors"
|
||||||
"github.com/shankar0123/certctl/internal/repository"
|
"github.com/certctl-io/certctl/internal/repository"
|
||||||
"net/http"
|
"net/http"
|
||||||
"strconv"
|
"strconv"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"github.com/shankar0123/certctl/internal/api/middleware"
|
"github.com/certctl-io/certctl/internal/api/middleware"
|
||||||
"github.com/shankar0123/certctl/internal/domain"
|
"github.com/certctl-io/certctl/internal/domain"
|
||||||
)
|
)
|
||||||
|
|
||||||
// OwnerService defines the service interface for owner operations.
|
// OwnerService defines the service interface for owner operations.
|
||||||
|
|||||||
@@ -7,8 +7,8 @@ import (
|
|||||||
"strconv"
|
"strconv"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"github.com/shankar0123/certctl/internal/api/middleware"
|
"github.com/certctl-io/certctl/internal/api/middleware"
|
||||||
"github.com/shankar0123/certctl/internal/domain"
|
"github.com/certctl-io/certctl/internal/domain"
|
||||||
)
|
)
|
||||||
|
|
||||||
// PolicyService defines the service interface for policy rule operations.
|
// PolicyService defines the service interface for policy rule operations.
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ import (
|
|||||||
"testing"
|
"testing"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/shankar0123/certctl/internal/domain"
|
"github.com/certctl-io/certctl/internal/domain"
|
||||||
)
|
)
|
||||||
|
|
||||||
// MockPolicyService is a mock implementation of PolicyService interface.
|
// MockPolicyService is a mock implementation of PolicyService interface.
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ import (
|
|||||||
"testing"
|
"testing"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/shankar0123/certctl/internal/domain"
|
"github.com/certctl-io/certctl/internal/domain"
|
||||||
)
|
)
|
||||||
|
|
||||||
// MockProfileService is a mock implementation of ProfileService interface.
|
// MockProfileService is a mock implementation of ProfileService interface.
|
||||||
|
|||||||
@@ -4,13 +4,13 @@ import (
|
|||||||
"context"
|
"context"
|
||||||
"encoding/json"
|
"encoding/json"
|
||||||
"errors"
|
"errors"
|
||||||
"github.com/shankar0123/certctl/internal/repository"
|
"github.com/certctl-io/certctl/internal/repository"
|
||||||
"net/http"
|
"net/http"
|
||||||
"strconv"
|
"strconv"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"github.com/shankar0123/certctl/internal/api/middleware"
|
"github.com/certctl-io/certctl/internal/api/middleware"
|
||||||
"github.com/shankar0123/certctl/internal/domain"
|
"github.com/certctl-io/certctl/internal/domain"
|
||||||
)
|
)
|
||||||
|
|
||||||
// ProfileService defines the service interface for certificate profile operations.
|
// ProfileService defines the service interface for certificate profile operations.
|
||||||
|
|||||||
@@ -4,14 +4,14 @@ import (
|
|||||||
"context"
|
"context"
|
||||||
"encoding/json"
|
"encoding/json"
|
||||||
"errors"
|
"errors"
|
||||||
"github.com/shankar0123/certctl/internal/repository"
|
"github.com/certctl-io/certctl/internal/repository"
|
||||||
"net/http"
|
"net/http"
|
||||||
"strconv"
|
"strconv"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"github.com/shankar0123/certctl/internal/api/middleware"
|
"github.com/certctl-io/certctl/internal/api/middleware"
|
||||||
"github.com/shankar0123/certctl/internal/domain"
|
"github.com/certctl-io/certctl/internal/domain"
|
||||||
"github.com/shankar0123/certctl/internal/service"
|
"github.com/certctl-io/certctl/internal/service"
|
||||||
)
|
)
|
||||||
|
|
||||||
// RenewalPolicyService defines the service interface for renewal policy
|
// RenewalPolicyService defines the service interface for renewal policy
|
||||||
|
|||||||
@@ -9,8 +9,8 @@ import (
|
|||||||
"testing"
|
"testing"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/shankar0123/certctl/internal/domain"
|
"github.com/certctl-io/certctl/internal/domain"
|
||||||
"github.com/shankar0123/certctl/internal/service"
|
"github.com/certctl-io/certctl/internal/service"
|
||||||
)
|
)
|
||||||
|
|
||||||
// G-1 red tests: lock in the HTTP surface of /api/v1/renewal-policies before
|
// G-1 red tests: lock in the HTTP surface of /api/v1/renewal-policies before
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ import (
|
|||||||
"strings"
|
"strings"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/shankar0123/certctl/internal/api/middleware"
|
"github.com/certctl-io/certctl/internal/api/middleware"
|
||||||
)
|
)
|
||||||
|
|
||||||
// resolveActor extracts the authenticated named-key identity from the request
|
// resolveActor extracts the authenticated named-key identity from the request
|
||||||
|
|||||||
@@ -12,9 +12,9 @@ import (
|
|||||||
"net/http"
|
"net/http"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"github.com/shankar0123/certctl/internal/api/middleware"
|
"github.com/certctl-io/certctl/internal/api/middleware"
|
||||||
"github.com/shankar0123/certctl/internal/domain"
|
"github.com/certctl-io/certctl/internal/domain"
|
||||||
"github.com/shankar0123/certctl/internal/pkcs7"
|
"github.com/certctl-io/certctl/internal/pkcs7"
|
||||||
)
|
)
|
||||||
|
|
||||||
// SCEPService defines the service interface for SCEP enrollment operations.
|
// SCEPService defines the service interface for SCEP enrollment operations.
|
||||||
|
|||||||
@@ -22,8 +22,8 @@ import (
|
|||||||
"testing"
|
"testing"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/shankar0123/certctl/internal/domain"
|
"github.com/certctl-io/certctl/internal/domain"
|
||||||
"github.com/shankar0123/certctl/internal/pkcs7"
|
"github.com/certctl-io/certctl/internal/pkcs7"
|
||||||
)
|
)
|
||||||
|
|
||||||
// SCEP RFC 8894 + Intune master bundle Phase 5.2: ChromeOS-shape integration
|
// SCEP RFC 8894 + Intune master bundle Phase 5.2: ChromeOS-shape integration
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ import (
|
|||||||
"strings"
|
"strings"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"github.com/shankar0123/certctl/internal/domain"
|
"github.com/certctl-io/certctl/internal/domain"
|
||||||
)
|
)
|
||||||
|
|
||||||
// mockSCEPService implements SCEPService for testing.
|
// mockSCEPService implements SCEPService for testing.
|
||||||
|
|||||||
@@ -23,11 +23,11 @@ import (
|
|||||||
"testing"
|
"testing"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/shankar0123/certctl/internal/domain"
|
"github.com/certctl-io/certctl/internal/domain"
|
||||||
"github.com/shankar0123/certctl/internal/pkcs7"
|
"github.com/certctl-io/certctl/internal/pkcs7"
|
||||||
"github.com/shankar0123/certctl/internal/repository"
|
"github.com/certctl-io/certctl/internal/repository"
|
||||||
"github.com/shankar0123/certctl/internal/scep/intune"
|
"github.com/certctl-io/certctl/internal/scep/intune"
|
||||||
"github.com/shankar0123/certctl/internal/service"
|
"github.com/certctl-io/certctl/internal/service"
|
||||||
)
|
)
|
||||||
|
|
||||||
// SCEP RFC 8894 + Intune master bundle Phase 10.2 — hermetic end-to-end
|
// SCEP RFC 8894 + Intune master bundle Phase 10.2 — hermetic end-to-end
|
||||||
|
|||||||
@@ -15,10 +15,10 @@ import (
|
|||||||
"testing"
|
"testing"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/shankar0123/certctl/internal/domain"
|
"github.com/certctl-io/certctl/internal/domain"
|
||||||
"github.com/shankar0123/certctl/internal/pkcs7"
|
"github.com/certctl-io/certctl/internal/pkcs7"
|
||||||
"github.com/shankar0123/certctl/internal/scep/intune"
|
"github.com/certctl-io/certctl/internal/scep/intune"
|
||||||
"github.com/shankar0123/certctl/internal/service"
|
"github.com/certctl-io/certctl/internal/service"
|
||||||
)
|
)
|
||||||
|
|
||||||
// SCEP RFC 8894 + Intune master prompt §13 line 1851 acceptance —
|
// SCEP RFC 8894 + Intune master prompt §13 line 1851 acceptance —
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import (
|
|||||||
"net/http"
|
"net/http"
|
||||||
"strconv"
|
"strconv"
|
||||||
|
|
||||||
"github.com/shankar0123/certctl/internal/api/middleware"
|
"github.com/certctl-io/certctl/internal/api/middleware"
|
||||||
)
|
)
|
||||||
|
|
||||||
// StatsService defines the service interface for statistics operations.
|
// StatsService defines the service interface for statistics operations.
|
||||||
|
|||||||
@@ -9,8 +9,8 @@ import (
|
|||||||
"testing"
|
"testing"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/shankar0123/certctl/internal/domain"
|
"github.com/certctl-io/certctl/internal/domain"
|
||||||
"github.com/shankar0123/certctl/internal/service"
|
"github.com/certctl-io/certctl/internal/service"
|
||||||
)
|
)
|
||||||
|
|
||||||
// MockTargetService is a mock implementation of TargetService interface.
|
// MockTargetService is a mock implementation of TargetService interface.
|
||||||
|
|||||||
@@ -8,9 +8,9 @@ import (
|
|||||||
"strconv"
|
"strconv"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"github.com/shankar0123/certctl/internal/api/middleware"
|
"github.com/certctl-io/certctl/internal/api/middleware"
|
||||||
"github.com/shankar0123/certctl/internal/domain"
|
"github.com/certctl-io/certctl/internal/domain"
|
||||||
"github.com/shankar0123/certctl/internal/service"
|
"github.com/certctl-io/certctl/internal/service"
|
||||||
)
|
)
|
||||||
|
|
||||||
// TargetService defines the service interface for deployment target operations.
|
// TargetService defines the service interface for deployment target operations.
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ import (
|
|||||||
"testing"
|
"testing"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/shankar0123/certctl/internal/domain"
|
"github.com/certctl-io/certctl/internal/domain"
|
||||||
)
|
)
|
||||||
|
|
||||||
// MockTeamService is a mock implementation of TeamService interface.
|
// MockTeamService is a mock implementation of TeamService interface.
|
||||||
|
|||||||
@@ -7,8 +7,8 @@ import (
|
|||||||
"strconv"
|
"strconv"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"github.com/shankar0123/certctl/internal/api/middleware"
|
"github.com/certctl-io/certctl/internal/api/middleware"
|
||||||
"github.com/shankar0123/certctl/internal/domain"
|
"github.com/certctl-io/certctl/internal/domain"
|
||||||
)
|
)
|
||||||
|
|
||||||
// TeamService defines the service interface for team operations.
|
// TeamService defines the service interface for team operations.
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ package handler
|
|||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
|
|
||||||
"github.com/shankar0123/certctl/internal/repository"
|
"github.com/certctl-io/certctl/internal/repository"
|
||||||
)
|
)
|
||||||
|
|
||||||
// Mock errors for testing.
|
// Mock errors for testing.
|
||||||
|
|||||||
@@ -7,8 +7,8 @@ import (
|
|||||||
"net/http"
|
"net/http"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/shankar0123/certctl/internal/api/middleware"
|
"github.com/certctl-io/certctl/internal/api/middleware"
|
||||||
"github.com/shankar0123/certctl/internal/domain"
|
"github.com/certctl-io/certctl/internal/domain"
|
||||||
)
|
)
|
||||||
|
|
||||||
// VerificationService defines the service interface for verification operations.
|
// VerificationService defines the service interface for verification operations.
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ import (
|
|||||||
"testing"
|
"testing"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/shankar0123/certctl/internal/domain"
|
"github.com/certctl-io/certctl/internal/domain"
|
||||||
)
|
)
|
||||||
|
|
||||||
// mockVerificationService is a test double for VerificationService.
|
// mockVerificationService is a test double for VerificationService.
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ import (
|
|||||||
// VersionInfo is populated from three sources, in priority order:
|
// VersionInfo is populated from three sources, in priority order:
|
||||||
//
|
//
|
||||||
// 1. The Version field — typically supplied at build time via
|
// 1. The Version field — typically supplied at build time via
|
||||||
// `-ldflags='-X github.com/shankar0123/certctl/internal/api/handler.Version=v2.0.50'`.
|
// `-ldflags='-X github.com/certctl-io/certctl/internal/api/handler.Version=v2.0.50'`.
|
||||||
// Production releases set this from the git tag (see release.yml).
|
// Production releases set this from the git tag (see release.yml).
|
||||||
//
|
//
|
||||||
// 2. runtime/debug.ReadBuildInfo() — populated by Go 1.18+ for any binary
|
// 2. runtime/debug.ReadBuildInfo() — populated by Go 1.18+ for any binary
|
||||||
@@ -42,7 +42,7 @@ type VersionHandler struct{}
|
|||||||
|
|
||||||
// Version is overridden at build time via:
|
// Version is overridden at build time via:
|
||||||
//
|
//
|
||||||
// -ldflags='-X github.com/shankar0123/certctl/internal/api/handler.Version=<tag>'
|
// -ldflags='-X github.com/certctl-io/certctl/internal/api/handler.Version=<tag>'
|
||||||
//
|
//
|
||||||
// release.yml does this for the server container and CLI/agent binaries.
|
// release.yml does this for the server container and CLI/agent binaries.
|
||||||
// The empty default (rather than "dev") lets the Handler fall back to the
|
// The empty default (rather than "dev") lets the Handler fall back to the
|
||||||
|
|||||||
@@ -3,8 +3,8 @@ package router
|
|||||||
import (
|
import (
|
||||||
"net/http"
|
"net/http"
|
||||||
|
|
||||||
"github.com/shankar0123/certctl/internal/api/handler"
|
"github.com/certctl-io/certctl/internal/api/handler"
|
||||||
"github.com/shankar0123/certctl/internal/api/middleware"
|
"github.com/certctl-io/certctl/internal/api/middleware"
|
||||||
)
|
)
|
||||||
|
|
||||||
// Router wraps http.ServeMux and manages route registration with middleware.
|
// Router wraps http.ServeMux and manages route registration with middleware.
|
||||||
|
|||||||
@@ -6,8 +6,8 @@ import (
|
|||||||
"net/http/httptest"
|
"net/http/httptest"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"github.com/shankar0123/certctl/internal/api/handler"
|
"github.com/certctl-io/certctl/internal/api/handler"
|
||||||
"github.com/shankar0123/certctl/internal/domain"
|
"github.com/certctl-io/certctl/internal/domain"
|
||||||
)
|
)
|
||||||
|
|
||||||
// EST RFC 7030 hardening master bundle Phase 1: per-profile EST router
|
// EST RFC 7030 hardening master bundle Phase 1: per-profile EST router
|
||||||
|
|||||||
@@ -6,8 +6,8 @@ import (
|
|||||||
"net/http/httptest"
|
"net/http/httptest"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"github.com/shankar0123/certctl/internal/api/handler"
|
"github.com/certctl-io/certctl/internal/api/handler"
|
||||||
"github.com/shankar0123/certctl/internal/domain"
|
"github.com/certctl-io/certctl/internal/domain"
|
||||||
)
|
)
|
||||||
|
|
||||||
// SCEP RFC 8894 + Intune master bundle Phase 1.5: per-issuer profiles router
|
// SCEP RFC 8894 + Intune master bundle Phase 1.5: per-issuer profiles router
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import (
|
|||||||
"net/http/httptest"
|
"net/http/httptest"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"github.com/shankar0123/certctl/internal/api/handler"
|
"github.com/certctl-io/certctl/internal/api/handler"
|
||||||
)
|
)
|
||||||
|
|
||||||
// TestNew_ReturnsValidRouter tests that New() returns a properly initialized router.
|
// TestNew_ReturnsValidRouter tests that New() returns a properly initialized router.
|
||||||
|
|||||||
@@ -39,8 +39,8 @@ import (
|
|||||||
"strings"
|
"strings"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/shankar0123/certctl/internal/config"
|
"github.com/certctl-io/certctl/internal/config"
|
||||||
"github.com/shankar0123/certctl/internal/domain"
|
"github.com/certctl-io/certctl/internal/domain"
|
||||||
)
|
)
|
||||||
|
|
||||||
// Note: The actual AWS SDK import will be added once dependencies are available:
|
// Note: The actual AWS SDK import will be added once dependencies are available:
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ import (
|
|||||||
"testing"
|
"testing"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/shankar0123/certctl/internal/config"
|
"github.com/certctl-io/certctl/internal/config"
|
||||||
)
|
)
|
||||||
|
|
||||||
// Bundle Q (L-002 closure): edge-case coverage for awssm to push above 80%.
|
// Bundle Q (L-002 closure): edge-case coverage for awssm to push above 80%.
|
||||||
|
|||||||
@@ -14,8 +14,8 @@ import (
|
|||||||
"testing"
|
"testing"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/shankar0123/certctl/internal/config"
|
"github.com/certctl-io/certctl/internal/config"
|
||||||
"github.com/shankar0123/certctl/internal/domain"
|
"github.com/certctl-io/certctl/internal/domain"
|
||||||
)
|
)
|
||||||
|
|
||||||
// mockSMClient is a mock implementation of SMClient for testing.
|
// mockSMClient is a mock implementation of SMClient for testing.
|
||||||
|
|||||||
@@ -36,7 +36,7 @@ import (
|
|||||||
"sync"
|
"sync"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/shankar0123/certctl/internal/domain"
|
"github.com/certctl-io/certctl/internal/domain"
|
||||||
)
|
)
|
||||||
|
|
||||||
// Config represents the Azure Key Vault discovery configuration.
|
// Config represents the Azure Key Vault discovery configuration.
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user