I use Namecheap.com as a registrar, and they resale SSL Certs from a number of other companies, including Comodo.
These are the steps I went through to set up an SSL cert.
| /* Client side, works in Chrome 55 and Firefox 52 without transpilation */ | |
| //https://blogs.msdn.microsoft.com/typescript/2016/11/08/typescript-2-1-rc-better-inference-async-functions-and-more/ | |
| async function fetchURLs() { | |
| try { | |
| // Promise.all() lets us coalesce multiple promises into a single super-promise | |
| var data = await Promise.all([ | |
| /* Alternatively store each in an array */ | |
| // var [x, y, z] = await Promise.all([ | |
| // parse results as json; fetch data response has several reader methods available: | |
| //.arrayBuffer() |
| openssl genrsa 2048 > host.key | |
| openssl req -new -x509 -nodes -sha1 -days 3650 -key host.key > host.cert | |
| #[enter *.domain.com for the Common Name] | |
| openssl x509 -noout -fingerprint -text < host.cert > host.info | |
| cat host.cert host.key > host.pem | |
| chmod 400 host.key host.pem |
| CREATE ROLE tableau WITH LOGIN ENCRYPTED PASSWORD 'secretpassword123' NOSUPERUSER INHERIT NOCREATEDB NOCREATEROLE NOREPLICATION VALID UNTIL 'infinity'; | |
| GRANT CONNECT ON DATABASE 'my_database' TO tableau; | |
| GRANT USAGE ON SCHEMA public TO tableau; | |
| GRANT SELECT ON public.my_table, public.another_table, public.third_table TO tableau; | |
| GRANT SELECT ON ALL SEQUENCES IN SCHEMA public TO tableau; |
| CREATE ROLE tableau WITH LOGIN ENCRYPTED PASSWORD 'secretpassword123' NOSUPERUSER INHERIT NOCREATEDB NOCREATEROLE NOREPLICATION VALID UNTIL 'infinity'; | |
| GRANT CONNECT ON DATABASE 'my_database' TO tableau; | |
| GRANT USAGE ON SCHEMA public TO tableau; | |
| GRANT SELECT ON ALL TABLES IN SCHEMA public TO tableau; | |
| GRANT SELECT ON ALL SEQUENCES IN SCHEMA public TO tableau; |
| require "faraday_middleware/aws_signers_v4" | |
| class AmazonElasticSearchClient | |
| def self.client | |
| return Elasticsearch::Client.new(url: ENV["AWS_ELASTICSEARCH_URL"]) do |f| | |
| f.request :aws_signers_v4, | |
| service_name: 'es', | |
| credentials: Aws::Credentials.new(ENV["AWS_ACCESS_KEY_ID"], ENV["AWS_SECRET_ACCESS_KEY"]), | |
| region: ENV["AWS_REGION"], | |
| # This is standard for Net::HTTP, if you |
| docker rmi $(docker images | grep "^<none>" | awk '{print $3}') | |
| docker rmi -f $(docker images --filter "dangling=true" | awk '{print $3}') |
| gem 'elasticsearch', '>= 1.0.15' | |
| gem 'elasticsearch-model' | |
| gem 'elasticsearch-rails' | |
| gem 'patron' | |
| gem 'faraday_middleware-aws-signers-v4' | |
| gem 'searchkick' |
| from raven.contrib.django.raven_compat.models import client as sentry_client | |
| class SentryMiddleware(object): | |
| def on_error(self, error): | |
| # Track error with sentry... | |
| # I intentionally left this part out as I have not been able to try it out. | |
| # You can look at my first example for inspiration. | |
| def resolve(self, next, root, args, context, info): | |
| return next(root, args, context, info).catch(self.on_error) | |
| # views.py | |
| from graphene_django.views import GraphQLView | |
| from raven.contrib.django.raven_compat.models import client as sentry_client | |
| class SentryGraphQLView(GraphQLView): | |
| def execute_graphql_request(self, *args, **kwargs): | |
| """Extract any exceptions and send them to Sentry""" | |
| result = super().execute_graphql_request(*args, **kwargs) | |
| if result.errors: |
I use Namecheap.com as a registrar, and they resale SSL Certs from a number of other companies, including Comodo.
These are the steps I went through to set up an SSL cert.