security_exception causes data to silently drop

Aperta
#32 0 commenti 3 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
38/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Ferma
Stack tecnologico
ruby
Ambito
backend, databases

Direzione di ricerca

Non è indicato alcun file sorgente né alcun test. Inizia riproducendo la configurazione Fluentd fornita e traccia come il plugin OpenSearch gestisce una security_exception durante le scritture. Il lavoro è completato quando i messaggi non riusciti non scompaiono più silenziosamente e raggiungono ERROR o l’etichetta configurabile richiesta, con il comportamento verificato rispetto a questa riproduzione.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

enhancement

(check apply)

  • read the contribution guideline
  • (optional) already reported 3rd party upstream repository or mailing list if you use k8s addon or helm charts.
Steps to replicate

When writing to an index the plugin does have permission to, the data writes correctly to OpenSearch.
When trying to write to an index the plugin does not have permission to, purposefully causing a security_exception, data appears to silently drop.

<system>
  workers 4
  root_dir /var/log/fluentd
</system>

<source>
  @type http
  port 8080
  bind 0.0.0.0
</source>

XXXFILTERSXXX

<match **>
    @id out_opensearch
    @type opensearch
    @log_level debug
    scheme https
    ssl_verify true
    host XXXHOSTXXX
    port XXXPORTXXX
    user XXXUSERXXX
    password XXXPASSWORDXXX
    target_index_key @target_index
    remove_keys @target_index
    compression_level default_compression
    log_os_400_reason true
    <buffer tag>
          flush_interval 1s
          retry_type periodic
          retry_forever true
          retry_wait 5s
    </buffer>
</match>

<label @FLUENT_LOG>
  <match **>
    @type stdout
  </match>
</label>

<label @ERROR>
  <match **>
    @type stdout
  </match>
</label>

Only messages seen output to stdout:
2022-03-17 14:11:31 +0000 [debug]: #0 [out_opensearch] Indexed (op = index), 6 security_exception
2022-03-17 14:11:31.901853800 +0000 fluent.debug: {"message":"[out_opensearch] Indexed (op = index), 6 security_exception"}

Expected Behavior or What you need to ask

Messages not uploaded due to security_exception should make their way to ERROR.
If not ERROR, perhaps a configurable label and optional re-tag?

Using Fluentd and OpenSearch plugin versions

OS version: Docker image built off ghcr.io/calyptia/fluentd:v1.14.5-debian-1.0
Bare Metal or within Docker or Kubernetes or others?: Docker image built off ghcr.io/calyptia/fluentd:v1.14.5-debian-1.0
Fluentd v1.0 or later: 1.14.5
OpenSearch plugin version: fluent-plugin-opensearch version 1.0.2

Lingua principale
Ruby
Stelle
64
Fork
25
Merge medio
1g 16h
PR unite (30g)
8

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di fluent/fluent-plugin-opensearch

Tutte le issue di fluent/fluent-plugin-opensearch

Issue simili

Altre issue su Ruby

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.