Skip to content
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

Add support for embargo acknowledgement in python and golang backends #4485

Merged
Merged
Changes from 1 commit
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
7946887
Add support for embargo acknowledgement in python backend
lukaszgryglicki Nov 21, 2024
1c0db12
Sync with AWS env updates
lukaszgryglicki Nov 27, 2024
247a9f8
ngrok details
lukaszgryglicki Nov 27, 2024
8e02cb1
Testing POST '/v1/signature' API
lukaszgryglicki Nov 27, 2024
3eeaf1f
WIP 'request_individual_signature' API
lukaszgryglicki Nov 27, 2024
c925764
Handle employee_signature
lukaszgryglicki Nov 27, 2024
e6df63d
Reorganized scripts/utils
lukaszgryglicki Nov 27, 2024
4f5ebf5
WIP golang API
lukaszgryglicki Nov 27, 2024
135774c
Update script
lukaszgryglicki Nov 27, 2024
823dbde
update golang API endpoint
lukaszgryglicki Nov 27, 2024
3370bda
Update util scripts
lukaszgryglicki Nov 29, 2024
e8cb5f0
Merge branch 'dev' into lukaszgryglicki-4482-add-embargo_acked-to-cla…
lukaszgryglicki Nov 29, 2024
f753f22
Run tests locally - added util script
lukaszgryglicki Nov 29, 2024
8f471ab
Merge branch 'dev' into lukaszgryglicki-4482-add-embargo_acked-to-cla…
lukaszgryglicki Dec 4, 2024
f2594aa
Update scripts
lukaszgryglicki Dec 4, 2024
1c67775
Handle py/go APIs
lukaszgryglicki Dec 4, 2024
ab386de
Updaste util script
lukaszgryglicki Dec 4, 2024
143221b
Add docusign envs
lukaszgryglicki Dec 4, 2024
359e54b
Example tests in comment
lukaszgryglicki Dec 4, 2024
ee55d19
Resolve merge conflicts
lukaszgryglicki Dec 4, 2024
73a1685
No longer needed
lukaszgryglicki Dec 4, 2024
d5388d5
Merge branch 'dev' into lukaszgryglicki-4482-add-embargo_acked-to-cla…
lukaszgryglicki Dec 4, 2024
3213897
Python APIs update to also set embargo_acked flag on existing signatu…
lukaszgryglicki Dec 5, 2024
22de891
Handle golang APIs signatures embargo acknowledgemet falgs
lukaszgryglicki Dec 5, 2024
32c9f1d
go fmt
lukaszgryglicki Dec 5, 2024
7aa75a8
Ready for review
lukaszgryglicki Dec 5, 2024
9442e3a
Ready for Review
lukaszgryglicki Dec 5, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Updaste util script
Signed-off-by: Łukasz Gryglicki <lgryglicki@cncf.io>
  • Loading branch information
lukaszgryglicki committed Dec 4, 2024
commit ab386de2a3dc6e4f22e4c5a9dba66b7a245f2cb4
39 changes: 32 additions & 7 deletions utils/request_individual_signature_go_post.sh
Original file line number Diff line number Diff line change
@@ -4,33 +4,58 @@
# project_id='88ee12de-122b-4c46-9046-19422054ed8d'
# return_url_type='github'
# return_url='http://localhost'
# DEBUG=1 ./utils/request_individual_signature_go_post.sh 9dcf5bbc-2492-11ed-97c7-3e2a23ea20b5 88ee12de-122b-4c46-9046-19422054ed8d github 'http://localhost'
# TOKEN='...' - Auth0 JWT bearer token
# XACL='...' - X-ACL header
# DEBUG=1 TOKEN="$(cat ./auth0.token.secret)" XACL="$(cat ./x-acl.secret)" ./utils/request_individual_signature_go_post.sh 9dcf5bbc-2492-11ed-97c7-3e2a23ea20b5 88ee12de-122b-4c46-9046-19422054ed8d github 'http://localhost'

if [ -z "$TOKEN" ]
then
# source ./auth0_token.secret
TOKEN="$(cat ./auth0.token.secret)"
fi

if [ -z "$TOKEN" ]
then
echo "$0: TOKEN not specified and unable to obtain one"
exit 1
fi

if [ -z "$XACL" ]
then
XACL="$(cat ./x-acl.secret)"
fi

if [ -z "$XACL" ]
then
echo "$0: XACL not specified and unable to obtain one"
exit 2
fi

if [ -z "$1" ]
then
echo "$0: you need to specify user_id as a 1st parameter"
exit 1
exit 3
fi
export user_id="$1"

if [ -z "$2" ]
then
echo "$0: you need to specify project_id as a 2nd parameter"
exit 2
exit 4
fi
export project_id="$2"

if [ -z "$3" ]
then
echo "$0: you need to specify return_url_type as a 3rd parameter: github|gitlab|gerrit"
exit 3
exit 5
fi
export return_url_type="$3"

if [ -z "$4" ]
then
echo "$0: you need to specify return_url as a 4th parameter"
exit 4
exit 6
fi
export return_url="$4"

@@ -41,6 +66,6 @@ fi

if [ ! -z "$DEBUG" ]
then
echo "curl -s -XPOST -H 'Authorization: Bearer ${TOKEN}' -H 'Content-Type: application/json' '${API_URL}/v4/request-individual-signature' -d '{\"project_id\":\"${project_id}\",\"user_id\":\"${user_id}\",\"return_url_type\":\"${return_url_type}\",\"return_url\":\"${return_url}\"}' | jq -r '.'"
echo "curl -s -XPOST -H 'X-ACL: ${XACL}' -H 'Authorization: Bearer ${TOKEN}' -H 'Content-Type: application/json' '${API_URL}/v4/request-individual-signature' -d '{\"project_id\":\"${project_id}\",\"user_id\":\"${user_id}\",\"return_url_type\":\"${return_url_type}\",\"return_url\":\"${return_url}\"}' | jq -r '.'"
fi
curl -s -XPOST -H "Authorization: Bearer ${TOKEN}" -H "Content-Type: application/json" "${API_URL}/v4/request-individual-signature" -d "{\"project_id\":\"${project_id}\",\"user_id\":\"${user_id}\",\"return_url_type\":\"${return_url_type}\",\"return_url\":\"${return_url}\"}" | jq -r '.'
curl -s -XPOST -H "X-ACL: ${XACL}" -H "Authorization: Bearer ${TOKEN}" -H "Content-Type: application/json" "${API_URL}/v4/request-individual-signature" -d "{\"project_id\":\"${project_id}\",\"user_id\":\"${user_id}\",\"return_url_type\":\"${return_url_type}\",\"return_url\":\"${return_url}\"}" | jq -r '.'