Content-Length: 368522 | pFad | https://github.com/sebadob/rauthy/commit/5f0c9c979c0ba3cb4d3a75cd78a899eee7d13464

71 Merge pull request #86 from sebadob/audit-part-6 · sebadob/rauthy@5f0c9c9 · GitHub
Skip to content

Commit

Permalink
Merge pull request #86 from sebadob/audit-part-6
Browse files Browse the repository at this point in the history
Audit part 6
  • Loading branch information
sebadob authored Oct 23, 2023
2 parents f70f0b2 + ef1270a commit 5f0c9c9
Show file tree
Hide file tree
Showing 11 changed files with 401 additions and 77 deletions.
19 changes: 19 additions & 0 deletions rauthy-book/src/config/config.md
Original file line number Diff line number Diff line change
Expand Up @@ -207,6 +207,25 @@ MAX_HASH_THREADS=1
# if this happens more often. (default: 500)
#HASH_AWAIT_WARN_TIME=500
#####################################
######### EVENTS / AUDIT ############
#####################################
# The E-Mail address event notifications should be sent to
#EVENT_EMAIL=admin@localhost.de
# The notification level for events. Works the same way as a
# logging level. For instance:
# 'notice' means send out a notifications for all events with the
# info level or higher.
# Possible values:
# - info
# - notice
# - warning
# - critical
# default: 'notice'
#EVENT_NOTIFY_LEVEL=notice
#####################################
####### LIFETIMES / TIMEOUTS ########
#####################################
Expand Down
37 changes: 19 additions & 18 deletions rauthy-main/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ use rauthy_handlers::{clients, events, generic, groups, oidc, roles, scopes, ses
use rauthy_models::app_state::{AppState, Caches, DbPool};
use rauthy_models::email::EMail;
use rauthy_models::events::listener::EventListener;
use rauthy_models::events::notifier::EventNotifier;
use rauthy_models::{email, ListenScheme};
use rauthy_service::auth;

Expand All @@ -58,7 +59,8 @@ mod tls;

#[tokio::main]
async fn main() -> Result<(), Box<dyn Error>> {
let banner = r#"
println!(
r#"
88
,d 88
88 88
Expand All @@ -70,12 +72,7 @@ async fn main() -> Result<(), Box<dyn Error>> {
d8'
d8'
"#
.to_string();

// banner
println!("{}", banner);
// just a gimmick, drop it immediately and free up the memory
drop(banner);
);
// This sleep is just a test. On some terminals, the banner gets mixed up with the first other
// logs. We dont care about rauthy's startup time being 1ms longer.
time::sleep(Duration::from_millis(1)).await;
Expand Down Expand Up @@ -169,7 +166,7 @@ async fn main() -> Result<(), Box<dyn Error>> {
let (tx_events_router, rx_events_router) = flume::unbounded();
let app_state = web::Data::new(
AppState::new(
tx_email,
tx_email.clone(),
tx_events.clone(),
tx_events_router.clone(),
caches,
Expand All @@ -183,7 +180,9 @@ async fn main() -> Result<(), Box<dyn Error>> {
.expect("Passkey UV migration to not fail");

// events listener
EventNotifier::init().unwrap();
tokio::spawn(EventListener::listen(
tx_email,
tx_events_router,
rx_events_router,
rx_events,
Expand Down Expand Up @@ -213,46 +212,48 @@ async fn main() -> Result<(), Box<dyn Error>> {
//
// loop {
// time::sleep(Duration::from_secs(5)).await;
// Event::brute_force("192.15.15.1".to_string())
// rauthy_models::events::event::Event::brute_force("192.15.15.1".to_string())
// .send(&txe)
// .await
// .unwrap();
//
// time::sleep(Duration::from_secs(5)).await;
// Event::dos("192.15.15.1".to_string())
// rauthy_models::events::event::Event::dos("192.15.15.1".to_string())
// .send(&txe)
// .await
// .unwrap();
//
// time::sleep(Duration::from_secs(5)).await;
// Event::invalid_login(2, "192.15.15.1".to_string())
// rauthy_models::events::event::Event::invalid_login(2, "192.15.15.1".to_string())
// .send(&txe)
// .await
// .unwrap();
//
// time::sleep(Duration::from_secs(2)).await;
// Event::invalid_login(5, "192.15.15.1".to_string())
// rauthy_models::events::event::Event::invalid_login(5, "192.15.15.1".to_string())
// .send(&txe)
// .await
// .unwrap();
//
// time::sleep(Duration::from_secs(1)).await;
// Event::invalid_login(7, "192.15.15.1".to_string())
// rauthy_models::events::event::Event::invalid_login(7, "192.15.15.1".to_string())
// .send(&txe)
// .await
// .unwrap();
//
// time::sleep(Duration::from_secs(5)).await;
// Event::ip_blacklisted("192.15.15.1".to_string())
// rauthy_models::events::event::Event::ip_blacklisted("192.15.15.1".to_string())
// .send(&txe)
// .await
// .unwrap();
//
// time::sleep(Duration::from_secs(10)).await;
// Event::rauthy_admin("sebastiandobe@mailbox.org".to_string())
// .send(&txe)
// .await
// .unwrap();
// rauthy_models::events::event::Event::rauthy_admin(
// "sebastiandobe@mailbox.org".to_string(),
// )
// .send(&txe)
// .await
// .unwrap();
//
// time::sleep(Duration::from_secs(10)).await;
// }
Expand Down
Loading

0 comments on commit 5f0c9c9

Please sign in to comment.








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: https://github.com/sebadob/rauthy/commit/5f0c9c979c0ba3cb4d3a75cd78a899eee7d13464

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy