Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Replace raw JSON config in activity log streams with a typed struct

Open
#3,815 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
55/100
Issue type
Refactor
Clarity
Mostly clear
Activity status
Active
Tech stack
rust
Domain
backend, security

Research direction

Start by reading the ActivityLogStream and ActivityLogStreamConfig definitions and the conversion shown in the issue; trace where the manual password removal happens. Done means config uses the typed config with the password wrapped as SecretStringWrapper and skipped during serialization, while validation remains in place and manual removal is dropped.

Written by the indexing model from the issue text.

Description

ActivityLogStream.config is stored and returned as raw serde_json::Value. The typed ActivityLogStreamConfig is only used for validation and its result is thrown away.

We should make config a typed struct with the password as SecretStringWrapper and skip_serializing, just like Settings, and drop the manual removal.

pub struct ActivityLogStream<I = NoId> {
    pub id: I,
    pub name: String,
    #[model(enum)]
    pub stream_type: ActivityLogStreamType,
    pub config: serde_json::Value,
}
// validate config
let _ = ActivityLogStreamConfig::from_serde_value(&data.stream_type, &data.stream_config)?;
let stream_model = ActivityLogStream {
    id: NoId,
    name: data.name,
    stream_type: data.stream_type,
    config: data.stream_config,
};
Dominant language
Rust
Stars
2.9k
Forks
119
Avg merge
1d 3h
Merged PRs (30d)
59

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from DefGuard/defguard

All issues in DefGuard/defguard

Similar issues

More Rust issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.