Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
GÉANT Service Orchestrator
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Jira
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
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
GÉANT Orchestration and Automation Team
GAP
GÉANT Service Orchestrator
Commits
4c54441e
Commit
4c54441e
authored
10 months ago
by
Mohammad Torkashvand
Browse files
Options
Downloads
Patches
Plain Diff
remove unused code for auth
parent
61eef98f
No related branches found
No related tags found
No related merge requests found
Pipeline
#87961
failed
10 months ago
Stage: tox
Stage: documentation
Stage: sonarqube
Changes
4
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
gso/auth/settings.py
+0
-39
0 additions, 39 deletions
gso/auth/settings.py
gso/oss-params-example.json
+0
-3
0 additions, 3 deletions
gso/oss-params-example.json
test/auth/test_oidc.py
+1
-1
1 addition, 1 deletion
test/auth/test_oidc.py
test/conftest.py
+1
-1
1 addition, 1 deletion
test/conftest.py
with
2 additions
and
44 deletions
gso/auth/settings.py
deleted
100644 → 0
+
0
−
39
View file @
61eef98f
"""
Security configurations and utilities for the GSO application. Handles OAuth2 and OpenID Connect.
authentication and authorization, including token validation and user authentication. Integrates
with external authentication providers for enhanced security management.
Todo: Remove token and sensitive data from OPA console and API.
"""
from
pydantic
import
Field
from
pydantic_settings
import
BaseSettings
class
Oauth2LibSettings
(
BaseSettings
):
"""
Common settings for applications depending on oauth2.
"""
ENVIRONMENT
:
str
=
"
local
"
SERVICE_NAME
:
str
=
""
MUTATIONS_ENABLED
:
bool
=
False
ENVIRONMENT_IGNORE_MUTATION_DISABLED
:
list
[
str
]
=
Field
(
default_factory
=
list
,
description
=
"
Environments for which to allow unauthenticated mutations
"
)
OAUTH2_ACTIVE
:
bool
=
True
OAUTH2_AUTHORIZATION_ACTIVE
:
bool
=
True
oauth2lib_settings
=
Oauth2LibSettings
()
class
Oauth2Settings
(
BaseSettings
):
"""
Configuration settings for OAuth2 and OpenID Connect (OIDC).
"""
OAUTH2_RESOURCE_SERVER_ID
:
str
=
""
OAUTH2_RESOURCE_SERVER_SECRET
:
str
=
""
OAUTH2_TOKEN_URL
:
str
=
""
OIDC_CONF_WELL_KNOWN_URL
:
str
=
""
OPA_URL
:
str
=
"
http://localhost:8181/v1/data/gap/gso/api/access
"
oauth2_settings
=
Oauth2Settings
()
This diff is collapsed.
Click to expand it.
gso/oss-params-example.json
+
0
−
3
View file @
4c54441e
...
...
@@ -102,8 +102,5 @@
"p_router"
:
"UUID"
},
"scopes"
:
[
"https://graph.microsoft.com/.default"
]
},
"AUTH"
:
{
"opa_url"
:
"http://127.0.0.1:8181/v1/data/gap/gso/api/access"
}
}
This diff is collapsed.
Click to expand it.
test/auth/test_oidc.py
+
1
−
1
View file @
4c54441e
...
...
@@ -5,6 +5,7 @@ import pytest
from
fastapi
import
HTTPException
,
Request
from
httpx
import
AsyncClient
,
NetworkError
,
Response
from
oauth2_lib.fastapi
import
OIDCConfig
from
oauth2_lib.settings
import
oauth2lib_settings
from
gso.auth.oidc
import
(
OIDCAuthentication
,
...
...
@@ -12,7 +13,6 @@ from gso.auth.oidc import (
_is_callback_step_endpoint
,
)
from
gso.auth.opa
import
_get_decision
from
gso.auth.settings
import
oauth2lib_settings
@pytest.fixture
(
scope
=
"
module
"
,
autouse
=
True
)
...
...
This diff is collapsed.
Click to expand it.
test/conftest.py
+
1
−
1
View file @
4c54441e
...
...
@@ -11,6 +11,7 @@ from alembic import command
from
alembic.config
import
Config
from
faker
import
Faker
from
faker.providers
import
BaseProvider
from
oauth2_lib.settings
import
oauth2lib_settings
from
orchestrator
import
app_settings
from
orchestrator.db
import
(
Database
,
...
...
@@ -30,7 +31,6 @@ from sqlalchemy.engine import make_url
from
sqlalchemy.orm
import
scoped_session
,
sessionmaker
from
starlette.testclient
import
TestClient
from
gso.auth.settings
import
oauth2lib_settings
from
gso.db.models
import
PartnerType
from
gso.main
import
init_gso_app
from
gso.schema.partner
import
PartnerCreate
...
...
This diff is collapsed.
Click to expand it.
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