Organization - Mozilla
Project Mentor - Mathieu Leplatre
Summary
import base64 | |
import ecdsa | |
import requests | |
import cryptography.x509 | |
from cryptography.hazmat.backends import default_backend | |
from cryptography.hazmat.primitives.hashes import SHA384 | |
from cryptography.hazmat.primitives.asymmetric import ec as cryptography_ec | |
from cryptography.hazmat.primitives.asymmetric.utils import encode_dss_signature | |
/* | |
* | |
* Licensed under the Apache License, Version 2.0 (the "License"); | |
* you may not use this file except in compliance with the License. | |
* You may obtain a copy of the License at | |
* | |
* http://www.apache.org/licenses/LICENSE-2.0 | |
* | |
* Unless required by applicable law or agreed to in writing, software | |
* distributed under the License is distributed on an "AS IS" BASIS, |
Some tests to write:
https://firefox-source-docs.mozilla.org/services/common/services/RemoteSettings.html#unit-tests
In order to verify that a signal was sent:
make up | |
docker-compose kill | |
./scripts/build.sh | |
Sending build context to Docker daemon 17.66MB | |
Step 1/11 : FROM python:3.6 | |
---> 4f13b7f2138e | |
Step 2/11 : ENV PYTHONDONTWRITEBYTECODE 1 | |
---> Using cache | |
---> 9db6e2d323b4 | |
Step 3/11 : WORKDIR /app |
import os | |
from github import Github | |
WITH_BORS = [("mozilla-services", "kinto-dist")] | |
def main(): | |
g = Github(os.getenv("TOKEN")) |
<!DOCTYPE html> | |
<html> | |
<head> | |
<script src="//unpkg.com/[email protected]/dist/kinto.noshim.js" | |
integrity="sha384-HAvdRnGimsCGQDQo6XnILXgZ3rJGI2RGQXdrH0wLZURMuFNyZIvYOOrAwgs2nsgj" | |
crossorigin="anonymous"> | |
</script> | |
</head> | |
<body> | |
<h1>Benchmark</h1> |
import os | |
import requests | |
import kinto_http | |
ACCESS_TOKEN = os.getenv("TOKEN", "") | |
SERVER = os.getenv("SERVER", "https://settings-writer.stage.mozaws.net/v1") | |
DICT_URL = os.getenv("SOURCE", "https://github.com/mozilla-l10n/firefox-dictionaries/raw/master/output/dictionaries_minimal.json") | |
DOC_URL = "https://remote-settings.readthedocs.io/en/latest/frequently-asked-questions.html#how-do-i-automate-the-publication-of-records" |
SERVER=https://kinto.dev.mozaws.net/v1 | |
BUCKET=main | |
COLLECTION=public-suffix-list | |
RECORD=b719eacd-96ed-4979-bfd8-538fd39d9c05 # uuidgen | |
echo | |
echo "Create user" | |
curl -X PUT ${SERVER}/accounts/psl \ | |
-H 'Content-Type:application/json' \ | |
-d '{"data": {"password": "psl-secret"}}' \ |
attachment: | |
enabled: true | |
required: true | |
displayFields: | |
- details.name | |
- incremental | |
- attachment.filename | |
schema: | |
type: object | |
description: Certificate revocation data. |