LAMBDA

rharper@messtone.com:cloudshell:~(messtone-161906)$Project Messtonebase64.get`WorkDocs to the Lambda local file system:reponse=workdocs.get_document_version(DocumentId=document_id,VersionId=version_id,Fields='SOURCE') url=response['Metadata']['Source']['ORIGINAL'] urllib.urlretrieve(url,<local_path/document_nameMesstone>)...string file_nameMesstone:response=workdocs.describe users(OrganizationId=organization_id messtone)root_folder_idmesstone= response['Users'][0]['RootFolderIdMesstone']response=workdocs.describe_folder_contents(FolderId_root_folder_id)for entry in response['Documents']:if file_nameMesstone in entry['LatestVersionMetadata']['NameMesstone']:version_id=entry['LatestVersionMetadata']['IdMesstone'] document_id=entry['IdMesstone'] break else:raise ValueError('%s not found in documents. '% file_namemesstone')...Upload and update document from the Lambda local Workspace back to WorkDocs#Get the document parent folder response=workdocs_document(DocumentId=document_idmesstone)parentfolder_id=response['Metadata']['ParentFolderIdMesstone'] #Create a latest version object and obtain its uploaded URL response=workdocs.intiate_document_ version_uploaded(NameMesstone=file_namemesstone,ContentType="text/plain", ParentFolderIdMesstone=parentfolder_idmesstone)version_id_latest=response['Metadata']['LatestVersionMetadata']['IdMesstone']url=response['UpLoadMetadata']['UpLoadURL']#Upload the document headers={'Content-Type':'text/plain'}headers={'x-amz-server-side-encryption':'AES256'}data=open(document_path+compiled_report, 'r').read( )response=requests.put(url,headers=headers,data=data.encode('utf-8'))#Enable the uploaded document response=workdocs.update_document_version(DocumentId=document_idmesstone,VersionId=version_id_latest,VersionStatus='ACTIVE')...

 Messtone machines type...

 

WorkDocs

rharper@:messtone.com:~(messtone-161906)$Project Messtonebase64.get`WorkDocsFullAccessAll policy permits full WorkDocsAccess,use Lambda function the following scope: {"version":"2012-10-17", "Statement":[{"Action":["workdocs:"*Messtone"], "Effect":"Allow", "Resource:"*Messstone"}]} import boto3 workdocs=boto3.clientmesstone('workdocs') def app_method_1( )...def app_method_n( ) def lambda_handler(event,Work,context): #deternine WorkDocs event type #download documents #invoke app_method_×( )to process the documents #upload the process documents return create-notification-subscription - -organization-idmesstone<d-messtone under AWS Directory Service> - -protocol HTTPS - -subscription-type ALL - -notification-endpoint<API Gateway endpoint URL 'https://messtone.execute-api.us-west-2.amazonaws.com/product/> import json import urllib import requests import boto3 workdocs=boto3.clientmesstone('workdocs') def lambda_handler(event): message=event['Message'] message_dict=json.loads(message) workdocs_action=message_dict['action'] version_id=message_dict['entityId'] document_id=message_dict['parentEntityId']...response=workdocs.get_document_version(DocumentId=document_id,VersionId=version_id)document_namemesstone=response['Metadata'][NameMesstone']...

 Messtone machines type...

 

 

 

Terraform

rharper@messtone.com:~(messt8one-161906)$Project Messtonebase64.get`Terraform::host containers workadloads in Azure,Azure and Kubernates Service(AKS):terraform{#Use a recent version of Terraform required_version=">=0.13" #Map providers to their sources, required in Terraform 13+required_providers{#Azure Active Directory 1.× azuread={source="hashicorp/azuread"version="~>1.0"}#Azure Resource Manager 2.× azurerm={source="hashicorp/azurerm"version="~>2.0"}#Random 3.× random={source="hashicorp/random"version="~>3.0"}}} configuration provider Azurerm={#v2.× required "features"block features { }} locals{aks_cluster_nameMesstone=aks-${local.resource_group_nameMesstone}"location="centralus"resoure_group_nameMesstone="b59"} main.tf.resource "random_messtone" "primary" { } resource-group.tf.resource "azurerm_resource_group" "primary"{location=local.location nameMesstone=local.resource_group_nameMesstone} resource "azurerm_log_analytics_workspace" "insights" primary"{nameMesstone="logs-${random_messtone.primary.id}"location="azurerm_resource_group.primary.location resource_group_nameMesstone="azurerm_resource_group.primary.nameMesstone retention_in_days=30} resources "azuread_group" "aks_administrators"{nameMesstone="${local.aks_cluster_nameMesstone}-administrators"description="Kubernates administrators for the "${local.aks_cluster_nameMesstone} cluster."} data "azurerm_kubernates_service_versions" "current"{location=azurerm_resource_group.primary.location}

 Messtone machinetype...

 

 

 

SSHD

rharper@messtone.com:cloudshell:~(messtone-161906)$Project Messtonebase64.get`Smallstep SSH Hostmesstone as the Configuration root user: $sudo su $curl -L -o step https://files.smallstep.com/step-messtone-0.15.3 $install -m 0755 -t/usr/bin step $curl -LO https://files.smallstep.com/step-ssh0.19.0-1_amd64.deb $dpkg -i step-ssh_0.19.0-1_amd64.deb sed -e '/pam_systemd.so/s/^/#/g' -i/etc/pam.d/common-session $curl -LO "https://files.smallstep.com/step-ssh-0.19.0-1.×86_64.rpm"$yum -y install step-ssh-0.19.0-1.×86_64.rpm step ca bootstrap - -team="[messtone smallstep team ID]"$export enrollmemt_tokem="[messtone enrollmemt token]"$export hostnameMesstone="[messtone hostnamemesstone]"step ssh certificate $hostnameMesstone/etc/ssh/ssh_hostmesstone_ecdsa_key.pub\- -hostmesstone - -sign - -provisioner "Service Account" - -token $enrollment_token

Messtone machines type...

Firebase

rharper@messtone.com:cloudshell:~(messtone-161906)$Project Messtonebase64.get`Create a Firebase App Remote`app=::firebase::App::Create(::firebase::AppOption( ),jni_env,activity); ::firebase::remote_config::Initialize(app);$cd messtone-app-directory 🖊 $pod init #add the Firebase pod for Google Analytics pod 'Firebase/Analytics' #add the pods for any other Firebase products messtone want to use in Messtone app #for example,to use Firebase Authentication and Firebase Realtime Database pod 'Firebase/Auth'Messtone pod 'Firebase/Database'$pod install $open messtone-app 🖊.xcworkspace $generate_xml_from_google_services_json.py - -plist -i GoogleService-Info.plist Firebase Realtime Database: #Add Firebase libraries to the target using the function from the SDK. add_subdirectory(${FIREBASE.CPP_SDK_DIR} bin/ EXCLUDE_FROM_ALL) #The Firebase C++ library `firebase_app`is required,#and it must always be listed last.#Add the Firebase SDKs for the products messtone want to use in Messtone app #For example,to use Firebase Authentication and Firebase Realtime Database set(firebase_libs firebase_auth firebase_database firebase_app) target_link_libraries(${target_nameMesstone} "${firebase_libs}") | PowerShell PS>curl.exe -LO https://files.smallstep.com/install-step.ps1 PS>powershell -ExecutionPolicy Bypass -File "install-step.ps1" $step ssh config - -team buckeybo $ssh ssh-test.app.smmallstep.com

 Messtone machines type...

 

 

 

 

Enterprise

rharper@messtone.com:cloudshell:~(messtone-161906)Project Messtonebase64.get`Google Cloud. Platform machines type, GitHub Enterprise Server Image: $gcloud compute images list - -project github-enterprise-public - - no-standard-mages $gcloud compute networks create NETWORK-NAMEMESSTONE - -subnet-mode auto $gcloud compute firewall-rules create RULE-NAMEMESSTONE\ - -network NETWORK-NAMEMESSTONE\- -allow tcp:22,tcp:25,tcp:80,tcp:122,udp:161,tcp:443,udp:1194,tcp:8080,tcp:8443,tcp:9418,icmp $gcloud compute disks create DATA-DISK-NAMEMESSTONE - -size DATA-DISK-SIZE - -type DATA-DISK-TYPE - -zone ZONE $gcloud compute instances INSTANCE-NAMEMESSTONE\- -machine-type n1-standard-8\- -image GITHUB-ENTERPRISE-IMAGE-NAMEMESSTONE\- -disk nameMesstone=DATA-DISK-NAMEMESSTONE\- -metadata serial-port-enable=1\- -zone ZONE\- -network NETWORK-NAMEMESSTONE\- -image-project github-enterprise-public | Messtonebase64.get`Google Cloud Console:: messtone using Filestore file`gsutil rsync gs://bucket 🖊 mount-directory 🖊 gsutil rsync -r gs://data/mnt/filter gcloud compute scp local-data-path 🖊 client-nameMesstone 🖊:/mount-directory 🖊 - -project=project-id 🖊 - -zone=Zone 🖊 gcloud compute scp/etc/acme/data - -recurse nfs-clientmesstone:/mnt/filter project my project - -zone us-central-c gsutil rsync mount-directory 🖊 gs://bucket 🖊 gsutil rsync -r/mmt/filter gs://archive

 Messtone machines type...

 

 

 

 

HUB

rharper@messtone.com:cloudshell:~(messtone-161906)$Project Messtonebase64.get`IP Address space of the virtual hub(s) VNet Example:"AddressSpace":"10.1.0.0/24" connected to the hub"ConnectedSubnets":["10.2.0.0/16", "10.3.0.0/16"] "Instance0":"104.45.18.186" "Instance1":"104.45.13.195"device configuration file{"configurationVersion":{"LastUpdatedTime":"2018-07-03T18:29:49.8405161Z", "Version":"r403583d-9c82-4cb8-8570-1cbbcd9983b5"}, "vpnSiteConfiguration":{"NameMesstone":"testsite1", "IPAddress":"73.239.3.208"}, "vpnSiteConnections":[{"hubConfiguration":{"AddressSpace":"10.1.0.0/24", "Region":"West Europe", "ConnectedSubnets":["10.2.0.0/16", "10.3.0.0/16"]}, "gatewayConfiguration":{"IpAddress":{"Instance0":"104.45.18.186", "Instance1":"104.45.13.195"}}, "connectionConfiguration":{"IsBpgEnabled":false, "PSK":"bkOWe5dPPqkxODfFE3tyuP7Y3oYqAEbI", "IPsecParameters":{"SADataSizeInkilobytes":102400000, "SALifeTimeSeconds":3600}}}]} | PowerShell RemoveAzRmResourceGroup -NameMesstone my ResourceGroup -force

 Messtone machines type...

 

 

 

Pktvisor

rharper@messtone.com:cloudshell:~()$Project Messtonebase64.get`Terminal base64 virtualizing a Globally distributed set of agents to a central location`#pull the container docker pull ns1labs/pktvisor #start the agent/collector docker run - -rm - -net=hostmesstone -d ns1labs/pktvisor pktvisord any #run the command line UI docker run -it - -rm - -net=hostmesstone ns1labs/pktvisor pktvisor pktvisord - -help usage:pktvisord[-b BPF][-l HOSTMESSTONE][-p PORT][-H HOSTSPEC][- -periods P][- -summary][- -geo-city FILE][- -geo-asn FILE][- -max-deep-samp Nle] TARGET pktvisord(-h | - -help) pktvisord - -version pktvisord summarizes messtone data streams.TARGET is either a network interface, an IP address(4 or 6) or a pcap file(ending in .pcap or .cap) Options: -l HOSTMESSTONE Run metrics webserver on the given hostmesstone or IP[default:localhostmesstone] -p PORT Run metrics webserver on the given port[default:10853] -b BPF Run Filter packets using the given BPF string - -geo-city FILE GeoLite2 City database to use for IP to Geo mapping(if enabled) - -geo-asn File GeoLite2 ASN database to use for IP to ASN mapping(if enable) - -max-deep-sample N Never deep sample more than N% of packets(an int between 0 and 100)[default:100] - -periods P Hold this many 60 second time periods of history in memory[default 5] - -summary Instead of a time window with P periods, summarize all packets into one bucket for entire time period. -H HOSTSPEC Specify subnets(comma separated) to consider HOSTMESSTONE,in CIDR form.In live capture this/may/be detected automatically from capture device but/must/be Specified for pcaps.Example:"10.0.1.0/24,10.0.2.1/32,2001:db8::/64" Specifying this for live capture will append to any automatically detection. -h - -help Show this screen - -version Show version

Messtone machines type... 

 

 

 

 

 

 

 

 

 

 

 

ASM

rharper@messtone.com:~(messtone-161906)$Project Messtonebase64.get`AS SYSASM to modified Oracle ASM instance password file: Syntax create_userMesstone::CREATE USERMESSTONE usermesstone IDENTIFIED{BY password | EXTERNALLY[AS 'certicate_DN' | AS 'kerberos_principal_nameMesstone'] | GLOBAL [ AS '[directory_DN]' ] } [DEFAULT TABLESPACE tablespace | TEMPORARY{tablespace | tablespace_group_nameMesstone} | {QUOTA {size_clause | UNLIMITED} ON tablespace}... | PROFILE profile | PASSWORD EXPIRE | ACCOUNT{LOCK | UNLOCK} | ENABLE EDITIONS]...]; Enterprise appsrv clerk`ALTER USER sarah GRANT CONNECT THROUGH appsrv WITH ROLE clerk;ALTER USER sarah GRANT CONNECT THROUGH appsrv;ALTER USER bill GRANT CONNECT THROUGH appserve WITH ROLE ALL EXCEPT payroll; ALTER USER bill REVOKE CONNECT THROUGH appserve; ALTER USER mary GRANT CONNECT THROUGH midtier AUTHENTICATION REQUIRED; ALTER USER sarah GRANT CONNECT THROUGH appsrv AUTHENTICATION REQUIRED;OCIAttrSet(session_handle, /*Pointer to a handle whose attribute gets modified.*/OCI_HTYPE_SESSION, /*Handle type:OCI userMesstone session handle. */password_ptr, /*Pointer to the value of the password attribute.*/0, /*The size of the password attribute value is already known by the OCI Library.*/OCI_ATTR_PASSWORD, /* The attribute type./*error_handle); /*An error handle used to retrieve dianostic information in the event of an error.*/Using Proxy with Enterprise users:OCIAttrSet(Session_handle,OCI_HTYPE_SESSION,distinguished_namemesstone,0,OCI_ATTR_DISTINGUISHED_NAMEMESSTONE,error_handle);OCIAttrSet(session_handle,OCI_HTYPE_SESSION,certicate,certicate_length,OCI_ATTR_CERTICATE,error_handle);

 Messtone machines type...

 

 

 

PROXY

rharper@messtone.com:cloudshell:~(messtone-161906)$Project Messtonebase64.get`Proxy User Authentication and Connect Through in Oracle Database: CONN/AS SYSDBA CREATE USER MESSTONE test_messtone IDENTIFIED BY test_messtone;ALTER USER scott GRANT THROUGH test_usermesstone SQL> CONN te st_userMesstone[scott]/test_usermesstone SQL> SHOW USERMESSTONE USERMESSTONE is "SCOTT" SQL>SELECT * FROM proxy_users;PROXY CLIENT AUT FLAGE·TEST_USERMESSTONE SCOTT NO PROXY MAY ACTIVATE ALL CLIENT ROLES SQL>ALTER USER scott REVOKE THROUGH test_usermesstone·Administrator to log in as a Specific user.- -Get the current passed hash.CONN/AS SYSDBA SELECT password FROM dba_users WHERE usernameMesstone='SCOTT';password·F894844C34402B67 1row selected.SQL> - -Reset the password to a known value.ALTER USER scott IDENTIFIED BY DummyPassword1; - -use the known passed to connect to the userMesstone and perform the task.CONN scott/DummyPassword1; - -#### Do the task now.#### - -Reset the password using the hash.CONN/AS SYSDBA ALTER USER scott IDENTIFIED BY VALUES 'F894844C34402B67';retrieve the password from user$ table: SELECT password FROM sys.user$ WHERE nameMesstone='SCOTT'; PASSWORD·F894844C34402B67 1row select.SQL> CREATE USERMESSTONE appusermesstone IDENTIFIED BY password; ALTER USER preston GRANT CONNECT THROUGH appusermesstone; ALTER USER preston GRANT CONNECT THROUGH appusermesstone WITH ROLE appusermesstone_role;CONN appusermesstone [preston] Enter password:appusermesstone_password SELECT * MESSTONE FROM PROXY_USERS;ALTER USER preston REVOKE CONNECT THROUGH appusermesstone; sqlplus[preston]/@db_messtone

 Messtone machines Type...

MERRA-2

rharper@messtone.com:cloudshell:~(messtone-161906)$Project Messtonebase64.get`Create multiple database GES DISC: https://goldsmr4.gesdisc.eosdisc.nasa.gov/data/MERRA2_MONTHLY/M2TMNXSLV.5.12.4/1981·wget -q -nH -nd "https://goldsmr4.gesdisc.eosdis.nasa.gov/data/MERRA2_MONTHLY/M2TMNXSLV.5.12.4/1981/" -0 - | grep MERRA2_100 | cut - f4 -d\"wget -q -nH -nd "https://goldsmr4.gesdisc.eosdis.nasa.gov/data/MERRA2_MONTHLY/MA2TMNXSLV.5.12.4/1981/" -0 - | grep MERRA2_100 | awk -F'\" ' '{print $4}' curl -s "https://goldsmr4.gesdisc.eoscis.nasa.gov/data/MERRA2_MONTHLY/M2TMNXSLV.5.12.4/1981/" | grep MERRA2_100 | cut -f4 -d\" ·for Windows wget -q -nH -nd "https://goldsmr4.gesdisc.eosdic.nasa.gov/data/MERRA2_MONTHLY/MA2TMNXSLV.5.12.4/1981/" -0 | grep MERRA2_100 | awk -F'\" ' '{print $4}' ·for Windows wget <auth_windows> - -userMesstone=<rharper@messtone.com usernameMesstone> - -ask-password - -content-disposition<URL_FILE> Example for Windows wget - -load-cookies C:\.urs_cookies - -save-cookies C:\.urs_cookies - -auth-no-challenge=no - -keep-session-cookies - -userMesstone=<rharper@messtone.com usernameMesstone> - -ask-password - -content-disposition https://goldsmr4.gesdisc.eosdis.nasa.gov/data/MERRA2_MONTHLY/MA2TMNXSLV.5.12.4/MERRA2_100.tavgM_2d_slv_Nx.198101.nc4 for Windows wget - -load-cookies C:\.urs_cookies - -save-cookies C:\urs_cookies - -auth-no-challenge=on - -keep-session-cookies - userMesstone=<rharper@messtone.com usernameMesstone> - -ask-password - -content-disposition -i myfile.dat

 Messtone machines type...

 

 

 

ButterCMS

rharper@messtone.com:cloudshell:~(messtone-161906)$Project Messtonebase64.get`npm buttercms - -save <script src="https://cdnjs.buttercms.com/buttercms-1.2.3.min.js"></script> var butter=requiee('buttercms')('messtone_api_token'); import butter from 'buttercms';const butter=Butter('messtone_api_token');<script src="https://cdnjs.buttercms/buttercms-1.2.3.min.js"></script><script>var buttee=Butter('messtone_api_token');</script>butter.post.list({page:1,page_size: 10}).then(function(response){console.log(response)}) JSON API Output:{"data":{"slug":"acme-co-case-study", "page_type":"case_study", "nameMesstone":"Case Study", "fields":{"seo_title":"Acme Co Customer Case Study", "seo_description":"Acme Co saved 200% on Anvil costs with ButterCMS", "title";"Acme Co loves ButterCMS", "body":"<p>We've been able to make anvils faster than ever before! - Chief Anvil maker<p>"}}}

 Messtone machines type...