Skip to content

Commit

Permalink
Added approle module.
Browse files Browse the repository at this point in the history
  • Loading branch information
wa5i committed Aug 18, 2024
1 parent 44bd136 commit 78fdab4
Show file tree
Hide file tree
Showing 9 changed files with 6,287 additions and 4 deletions.
4 changes: 4 additions & 0 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ jobs:
- uses: actions/checkout@v3
- name: Build
run: cargo build --verbose
- name: ulimit -n
run: ulimit -n 65535
- name: Run tests
run: cargo test --verbose

Expand Down Expand Up @@ -83,6 +85,8 @@ jobs:
run: diesel setup --database-url mysql://root:[email protected]:3306/vault
- name: Build
run: cargo build --features storage_mysql --verbose
- name: ulimit -n
run: ulimit -n 65535
- name: Run tests
run: cargo test --verbose
- name: Build crate doc
Expand Down
13 changes: 12 additions & 1 deletion src/core.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,14 @@ use crate::{
handler::Handler,
logical::{Backend, Request, Response},
module_manager::ModuleManager,
modules::{auth::AuthModule, credential::userpass::UserPassModule, pki::PkiModule},
modules::{
auth::AuthModule,
credential::{
userpass::UserPassModule,
approle::AppRoleModule,
},
pki::PkiModule,
},
mount::MountTable,
router::Router,
shamir::{ShamirSecret, SHAMIR_OVERHEAD},
Expand Down Expand Up @@ -113,6 +120,10 @@ impl Core {
let userpass_module = UserPassModule::new(self);
self.module_manager.add_module(Arc::new(RwLock::new(Box::new(userpass_module))))?;

// add credential module: approle
let approle_module = AppRoleModule::new(self);
self.module_manager.add_module(Arc::new(RwLock::new(Box::new(approle_module))))?;

Ok(())
}

Expand Down
Loading

0 comments on commit 78fdab4

Please sign in to comment.