This repository has been archived by the owner on Nov 26, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #64 from EVOLVED-5G/CAPIF_aef_demo
Capif aef demo
- Loading branch information
Showing
31 changed files
with
602 additions
and
231 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,9 @@ | ||
cff-version: 2.0.0 | ||
cff-version: 2.1.0 | ||
message: "If you use this software, please cite it as below." | ||
authors: | ||
- family-names: "EVOLVED-5g" | ||
given-names: "EVOLVED-5g" | ||
title: "CAPIF_API_Services" | ||
version: 2.0 | ||
date-released: 2022-09-23 | ||
version: 2.1 | ||
date-released: 2022-01-30 | ||
url: "https://github.com/EVOLVED-5G/CAPIF_API_Services" |
This file contains 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 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
pipeline { | ||
agent any | ||
|
||
parameters { | ||
string(name: 'GIT_CICD_BRANCH', defaultValue: 'develop', description: 'Deployment git branch name') | ||
} | ||
|
||
stages { | ||
stage('Say Hello and Goobye!') { | ||
steps { | ||
echo "Hello and Goodbye" | ||
} | ||
} | ||
} | ||
} |
This file contains 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 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 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
21 changes: 21 additions & 0 deletions
21
...ices/TS29222_CAPIF_API_Provider_Management_API/api_provider_management/core/check_user.py
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
import sys | ||
from ..db.db import MongoDatabse | ||
|
||
class CapifUsersOperations: | ||
|
||
def __init__(self): | ||
self.db = MongoDatabse() | ||
|
||
def check_capif_user(self, common_name, role): | ||
try: | ||
mycol = self.db.get_col_by_name(self.db.capif_users) | ||
|
||
capif_user = mycol.find_one({"$and": [{"cn": common_name}, {"role": role}]}) | ||
|
||
if capif_user is None: | ||
return False | ||
|
||
return True | ||
except Exception as e: | ||
print("An exception occurred ::", e, file=sys.stderr) | ||
return False |
This file contains 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 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 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 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 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 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 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
#!/bin/bash | ||
DUMMY=dummy | ||
CUSTOMER_EXPOSER=customexposer | ||
./revoke_user.sh $DUMMY | ||
./revoke_user.sh $CUSTOMER_EXPOSER |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
#!/bin/bash | ||
USER=dummy | ||
if [ "$#" -eq 1 ]; then | ||
USER=$1 | ||
fi | ||
|
||
/root/EasyRSA-3.0.4/easyrsa --batch revoke $USER | ||
rm -rf /root/$USER.csr | ||
rm -rf /root/pki/issued/$USER.crt | ||
rm -rf /root/pki/reqs/$USER.req |
This file contains 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.