Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
ProxyIdP GUI
Manage
Activity
Members
Labels
Plan
Jira
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Perun
Perun ProxyIdP
ProxyIdP GUI
Commits
026cc2da
Verified
Commit
026cc2da
authored
8 months ago
by
Jan Pavlíček
Browse files
Options
Downloads
Patches
Plain Diff
fix: heuristic queries left outer join instead just left
parent
af9d521d
No related branches found
No related tags found
1 merge request
!102
fix: heuristic queries left outer join instead just left
Pipeline
#523328
passed
8 months ago
Stage: .pre
Stage: test
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
perun/proxygui/api/heuristic_api.py
+15
-4
15 additions, 4 deletions
perun/proxygui/api/heuristic_api.py
with
15 additions
and
4 deletions
perun/proxygui/api/heuristic_api.py
+
15
−
4
View file @
026cc2da
...
...
@@ -81,6 +81,8 @@ class AuthEventLoggingQueries:
# Basic checker if MFA was performed based on upstream_acrs value
def
upstream_acr_status
(
self
,
acr
):
if
not
acr
:
return
None
mfa_status
=
next
((
mfa
for
mfa
in
self
.
MFA_CONTEXTS
if
mfa
in
acr
),
None
)
return
mfa_status
is
not
None
...
...
@@ -122,11 +124,18 @@ class AuthEventLoggingQueries:
.
join
(
requested_table
,
requested_table
.
c
.
id
==
auth_table
.
c
.
requested_acrs_id
,
isouter
=
True
,
)
.
join
(
upstream_table
,
upstream_table
.
c
.
id
==
auth_table
.
c
.
upstream_acrs_id
,
isouter
=
True
,
)
.
join
(
upstream_table
,
upstream_table
.
c
.
id
==
auth_table
.
c
.
upstream_acrs_id
services_table
,
services_table
.
c
.
id
==
auth_table
.
c
.
sp_id
,
isouter
=
True
,
)
.
join
(
services_table
,
services_table
.
c
.
id
==
auth_table
.
c
.
sp_id
)
.
where
(
auth_table
.
c
.
user_id
==
user_id
)
.
distinct
(
auth_table
.
c
.
ip_address
)
).
alias
(
"
inner_query
"
)
...
...
@@ -146,7 +155,6 @@ class AuthEventLoggingQueries:
)
.
select_from
(
inner_query
)
.
order_by
(
inner_query
.
c
.
day
.
desc
())
.
limit
(
self
.
few_time_logs
)
)
response
=
cnxn
.
execute
(
outer_query
).
fetchall
()
...
...
@@ -175,9 +183,12 @@ class AuthEventLoggingQueries:
.
join
(
agents_raw_table
,
agents_raw_table
.
c
.
id
==
auth_table
.
c
.
user_agent_id
,
isouter
=
True
,
)
.
join
(
upstream_table
,
upstream_table
.
c
.
id
==
auth_table
.
c
.
upstream_acrs_id
upstream_table
,
upstream_table
.
c
.
id
==
auth_table
.
c
.
upstream_acrs_id
,
isouter
=
True
,
)
.
where
(
auth_table
.
c
.
user_id
==
user_id
)
.
order_by
(
auth_table
.
c
.
day
.
desc
())
...
...
This diff is collapsed.
Click to expand it.
Perun-GitLab Service Account
@9045464
mentioned in commit
420cc4c0
·
8 months ago
mentioned in commit
420cc4c0
mentioned in commit 420cc4c099c18f4bec7b1cddd0b0d3ee1dc21d27
Toggle commit list
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment