Skip to content

Commit

Permalink
Customer Config Creation Logic fic
Browse files Browse the repository at this point in the history
  • Loading branch information
achuthakamai committed Feb 7, 2024
1 parent db882c9 commit 4f5fc64
Show file tree
Hide file tree
Showing 5 changed files with 80 additions and 5 deletions.
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
app.py
.github
build/*
dist/*
dist/*
addrule.py
creds.json
Binary file modified pyakamai/__pycache__/akamaiproperty.cpython-311.pyc
Binary file not shown.
7 changes: 4 additions & 3 deletions pyakamai/akamaiproperty.py
Original file line number Diff line number Diff line change
Expand Up @@ -229,9 +229,10 @@ def createVersion(self,baseVersion):

if version_info[0] == 201:
version_link = version_info[1]['versionLink']
start_index = version_link.find('/versions')+10
end_index = version_link.find('?')
return version_link[start_index:end_index]
parts = version_link.split('/')
# Get the second last part which contains the version number
version_number = parts[-1]
return version_number
else:
return 0

Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

setuptools.setup(
name=PACKAGE_NAME,
version='2.31',
version='2.32',
author="Achuthananda M P",
author_email="achuthadivine@gmail.com",
description="A Boto3 like SDK for Akamai",
Expand Down
72 changes: 72 additions & 0 deletions template.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
{
"name": "Auth - stg.example.com",
"children": [
{
"name": "HTTP Basic Auth",
"children": [],
"behaviors": [
{
"name": "responseCode",
"options": {
"statusCode": 401
}
},
{
"name": "modifyOutgoingResponseHeader",
"options": {
"action": "ADD",
"customHeaderName": "WWW-Authenticate",
"headerValue": "Basic realm=\"Secure\"",
"standardAddHeaderName": "OTHER"
}
},
{
"name": "denyAccess",
"options": {
"enabled": true,
"reason": "Not-Authenticated"
}
}
],
"criteria": [
{
"name": "requestHeader",
"options": {
"headerName": "Authorization",
"matchOperator": "DOES_NOT_EXIST",
"matchWildcardName": false
}
},
{
"name": "requestHeader",
"options": {
"headerName": "Authorization",
"matchCaseSensitiveValue": true,
"matchOperator": "IS_NOT_ONE_OF",
"matchWildcardName": false,
"matchWildcardValue": false,
"values": [
"Basic cssss3RnbmV3czE4OsasdasmczIXBYJHRSQG5nRSM5Mg=="
]
}
}
],
"criteriaMustSatisfy": "any",
"comments": ""
}
],
"behaviors": [],
"criteria": [
{
"name": "hostname",
"options": {
"matchOperator": "IS_ONE_OF",
"values": [
"stg.example.com"
]
}
}
],
"criteriaMustSatisfy": "all",
"comments": ""
}

0 comments on commit 4f5fc64

Please sign in to comment.