Skip to content

CI/CD and Documentation #131

Description

@rosanemelo

T-12: CI/CD and Documentation

Description

Configure CI pipeline to run SSL tests and document the complete feature, including SSL modes, CA support, and limitations.

Delivered Value

Automated SSL testing in CI + complete documentation for users and developers.

Files to Create/Modify

File Action Description
tests/integration/ssl/README.md Create SSL tests documentation
.github/workflows/test.yml or equivalent Modify Add SSL testing stage

README.md Content

# Testes SSL para Bancos de Dados

## Visao Geral
Testes de integracao e E2E para validar conexoes SSL com MySQL, SQL Server e Oracle.
Inclui validacao de CA customizado em todas as factories.

## Execucao

### Testes de Integracao SSL
ENABLE_SSL=true go test -tags="integration,ssl" ./tests/integration/ssl/...

### Testes E2E SSL
ENABLE_SSL=true go test -tags="e2e,ssl" ./tests/chaos/e2e/... -run "SSL"

## Modos SSL Suportados

### MySQL
- `true` - SSL obrigatorio
- `skip-verify` - SSL sem verificacao de certificado
- `preferred` - SSL preferido mas nao obrigatorio
- Com CA: RegisterTLSConfig com nome unico por conexao

### SQL Server
- `true` - SSL obrigatorio (sem CA: TrustServerCertificate=true; com CA: validacao real)
- `strict` - SSL com verificacao completa (sem CA: system store; com CA: validacao contra CA)

### Oracle
- `true`/`enable` - SSL habilitado (ssl=enable na URL)
- `verify` - SSL com verificacao CA+hostname (ssl=enable&ssl verify=true)
- `skip-verify` - SSL sem verificacao (ssl=enable&ssl verify=false)
- Com CA: WithTLSConfig no connector go-ora

## CA Customizado
Todas as factories agora suportam CA customizado via campo `SSL.CA`:
- **MySQL**: RegisterTLSConfig com nome unico
- **SQL Server**: msdsn.Config.TLSConfig via connector
- **Oracle**: go_ora.Connector.WithTLSConfig

Quando CA nao e fornecido, cada factory mantem o comportamento original (retrocompativel).

## Limitacoes Conhecidas

### Oracle
- Oracle Wallet (`wallet_location`) nao implementado
- Protocolo TCPS nao implementado
- Formato TNS nao implementado (apenas Easy Connect)
- Requer `serviceName` no campo `Metadata` do Connection

Dependencies

  • Tasks 6-11 (all tests implemented)

Estimate

  • Size: S (small)
  • Complexity: Low

Acceptance Criteria

  • README.md documents all SSL modes and CA support
  • CI runs SSL tests (optional or scheduled)
  • Execution commands documented
  • Known limitations documented

Test Strategy

  • Verify CI runs tests correctly
  • Validate README against actual implementation

Task Summary

Task Phase Description Size Complexity Dependencies
1 1 - Foundation buildTLSConfig + Conditional CA Validation S Low -
2 2 - Implementation MySQL Factory with CA S Medium Task 1
3 2 - Implementation SQL Server Factory with CA M Medium Task 1
4 2 - Implementation Oracle SSL params + CA Factory M High Task 1
5 3 - Test Setup SSL Helpers S Low Tasks 2, 3, 4
6 4 - Integration MySQL SSL (modes + CA) M Medium Tasks 2, 5
7 4 - Integration SQL Server SSL (modes + CA) M Medium Tasks 3, 5
8 4 - Integration Oracle SSL (modes + SSL params + CA) M High Tasks 4, 5
9 5 - E2E E2E MySQL SSL M Medium Tasks 5, 6
10 5 - E2E E2E SQL Server SSL M Medium Tasks 5, 7
11 5 - E2E E2E Oracle SSL M High Tasks 5, 8
12 6 - Finalization CI/CD and Documentation S Low Tasks 6-11

Recommended Execution Order

  1. Phase 1 - Foundation: Task 1 (base for all factories)
  2. Phase 2 - Implementation: Tasks 2, 3, 4 (parallel - independent factories)
  3. Phase 3 - Test Setup: Task 5 (shared helpers)
  4. Phase 4 - Integration: Tasks 6, 7, 8 (parallel - per database tests)
  5. Phase 5 - E2E: Tasks 9, 10, 11 (parallel - per database tests)
  6. Phase 6 - Finalization: Task 12 (CI/CD + documentation)

Critical Path

T1 -> T2 -> T5 -> T6 -> T9 -> T12
      T3 ->       T7 -> T10
      T4 ->       T8 -> T11

Total estimated time (critical path): ~3-4 weeks
Estimated time with parallelism: ~2-3 weeks


Gate 7 Approval Criteria

  • Each task delivers user value
  • No task longer than 2 weeks
  • Clear dependencies between tasks
  • Test strategy defined for each task
  • Testable acceptance criteria
  • Integration tests include custom CA (fixed factories)
  • Backward compatibility guaranteed (tests without CA)
  • Oracle covers both gaps (SSL params + CA)
  • Helpers include all modes (including Oracle "verify")
  • Execution phases allow effective parallelism

Task gerada pelo Floki


Jira: FET-154
Link: https://lerian.atlassian.net/browse/FET-154

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions