-
-
Notifications
You must be signed in to change notification settings - Fork 44
Auth DB Module #148
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Auth DB Module #148
Changes from all commits
Commits
Show all changes
62 commits
Select commit
Hold shift + click to select a range
dc96556
Begin auth-db module
joshusooyaa ea1cedd
Set up constructor for AuthDBInstance
joshusooyaa 51d77c8
Fix log message
joshusooyaa 5a249c6
Update cmake list
joshusooyaa 043da1b
Merge branch 'develop' into auth-db
joshusooyaa e943529
Fix namespace typo
joshusooyaa 3df4cbc
Add missing virtual function
joshusooyaa c98c9e6
Implement on_service_event
joshusooyaa 81d009f
Finish AuthDBModule declarations
joshusooyaa ed068c4
Add config setup for AuthDB
joshusooyaa bc99773
Fix log for config setup
joshusooyaa 26fb7d9
Refactor
joshusooyaa 020946f
Add AuthResult struct
joshusooyaa e26839f
Start handle_bus_msg implementation
joshusooyaa 3c3ad1e
Implement update_and_log_auth_result_msg
joshusooyaa c84e2ff
Implement handle_kernel_msg
joshusooyaa 85164a8
Begin handle_auth implementation
joshusooyaa 0d14b2e
Update handle_auth to pass by pointer
joshusooyaa 218b2e9
Set up fetch credentials from database structure
joshusooyaa 648f037
Implement get_user
joshusooyaa e286f54
Merge branch 'develop' into auth-db
joshusooyaa 0dd4bf2
Fix compilation errors
joshusooyaa 426ddd4
Implement find_credentials_by_card_id
joshusooyaa 8ded91b
Build profile for authentication
joshusooyaa a9f3989
Implement is_access_granted
joshusooyaa 8c086af
Add audit logging on auth event
joshusooyaa d54d4d9
Add state to lbgipod message handling
joshusooyaa 3a2eb9c
Add noise filtering in authentication
joshusooyaa c93dd64
Update auth-db module readme
joshusooyaa 8709cf2
Remove uncessary method
joshusooyaa 1f23e6d
Add targets to authentication mapping
joshusooyaa b8396dc
Check users and groups for access
joshusooyaa 4c97fbf
Fix EventType values for proper FlagSet indexing
joshusooyaa ede14e9
Remove required AuditEntry parent
joshusooyaa fc03be6
Merge branch 'libgpiod' into doorman-schedules
joshusooyaa 7bf08d8
Add clear_schedules
joshusooyaa e5deec6
Begin db logic for door schedules
joshusooyaa e78964f
Fetch doors to configure schedule for
joshusooyaa d7d9c9b
Add open door schedules from db to doors
joshusooyaa 9e9fa20
Begin logic for adding close door schedules
joshusooyaa 249b5ad
Add 24_7 closed schedule to doors with no schedule
joshusooyaa 90f67fd
Group and insert closed full days
joshusooyaa 5ec1a77
Sort tf vector for future creation of closed schedule
joshusooyaa 394d31f
Improve tf var name clarity
joshusooyaa e7498a2
Add closed timeframes to door schedule
joshusooyaa 8ad4d7e
Log door open and closed schedules
joshusooyaa cdf1441
Refresh schedules every 60 seconds
joshusooyaa 14e7118
Fix closed tfs not adding correctly
joshusooyaa 697fec1
Adjust closed timeframe start/end times
joshusooyaa ad478c8
Set logging level through config
joshusooyaa 48dcbc5
Toggle logging through config for websockapi
joshusooyaa 43f9ed5
Fix bits threshold to greater/less than or equal
joshusooyaa eda9e16
Fix inverse schedule logic
joshusooyaa 0d2a2ed
Fix duplicate doorman objects
joshusooyaa 8df9c6d
Prevent always closed from denying access events
joshusooyaa af2fd4f
Fix cmake for auth-db
joshusooyaa 0f42114
Fix return
joshusooyaa 6e3ecba
Update cmake
joshusooyaa 97d1f95
Merge remote-tracking branch 'upstream/develop' into auth-db
joshusooyaa 5a788c6
Fix build dependency order
joshusooyaa 836ad6f
Merge remote-tracking branch 'upstream/develop' into auth-db
joshusooyaa 1ad1dfe
Merge profile schedules
joshusooyaa File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure to understand why this enum values & flag use have to be changed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These have been changed because we were getting something like this:
USER_CREATED = 0x10 & AL_SYSTEMbeing0x10 & 0x1000which is0x00because:So everything was defaulting to 0x00. As a result, when the code called
It would always result in
I used sequential numbers as a fix to simplify it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh yes indeed. You're right that was an issue/mistake, but I would prefer to keep using flags logic to be able to easily filter USER and SYSTEMS records if required. It would be better to fix the enum values with the original expected values in my opinion, that means replacing
&by|.eg.
USER_CREATED = 0x10 & AL_SYSTEM=>USER_CREATED = 0x10 | AL_SYSTEM