Kutoka kwa nyaraka:Azure App Service ni huduma inayotumia HTTP kwa kuhifadhi maombi ya wavuti, REST APIs, na sehemu za nyuma za simu. Unaweza kuendeleza kwa lugha yako pendwa, iwe ni .NET, .NET Core, Java, Ruby, Node.js, PHP, au Python. Maombi hufanya kazi na kustawi kwa urahisi kwenye mifumo ya Windows na Linux.
Kila programu inaendeshwa ndani ya sanduku lakini utengano unategemea mipango ya Huduma ya Programu
Programu katika safu za Free na Shared zinaendeshwa kwenye VMs zilizoshirikiwa
Programu katika safu za Standard na Premium zinaendeshwa kwenye VMs zilizotengwa
Tafadhali kumbuka kwamba hakuna ya utengano huo unazuia udhaifu mwingine wa kawaida wa wavuti (kama vile kupakia faili, au sindano). Na ikiwa kitambulisho cha usimamizi kinatumika, kinaweza kuwa na uwezo wa kuvunja ruhusa zake.
Uchambuzi
# List webappsazwebapplist## Less informationazwebapplist--query"[].{hostName: defaultHostName, state: state, name: name, resourcegroup: resourceGroup}"# Get access restrictionsazwebappconfigaccess-restrictionshow--resource-group<res-group>-n<name># Remove access restrictionsazwebappconfigaccess-restrictionremove--resource-group<res-group>-n<name>--rule-name<rule-name># Get snapshotsazwebappconfigsnapshotlist--resource-group<res-group>-n<name># Restore snapshotazwebappconfigsnapshotrestore-g<res-group>-n<name>--time2018-12-11T23:34:16.8388367# Restart webappazwebapprestart--name<name>--resource-group<res-group>
# Get App Services and Function AppsGet-AzWebApp# Get only App ServicesGet-AzWebApp|?{$_.Kind-notmatch"functionapp"}
#!/bin/bash# Get all App Service and Function Apps# Define Azure subscription IDazure_subscription="your_subscription_id"# Log in to Azureazlogin# Select Azure subscriptionazaccountset--subscription $azure_subscription# Get all App Services in the specified subscriptionlist_app_services=$(azappservicelist--query"[].{appServiceName: name, group: resourceGroup}"-otsv)# Iterate over each App Serviceecho"$list_app_services"|while IFS=$'\t'read-rappServiceNamegroup; do# Get the type of the App Serviceservice_type=$(azappserviceshow--name $appServiceName --resource-group $group --query"kind"-otsv)# Check if it is a Function App and print its nameif [ "$service_type"=="functionapp" ]; thenecho"Function App Name: $appServiceName"fidone
Pata siri na upate ufikiaji wa nambari ya programu ya wavuti
# Get connection strings that could contain credentials (with DBs for example)azwebappconfigconnection-stringlist--name<name>--resource-group<res-group>## Check how to use the DBs connection strings in the SQL page# Get credentials to access the code and DB credentials if configured.azwebappdeploymentlist-publishing-profiles--resource-group<res-group>-n<name># Get git URL to access the codeazwebappdeploymentsourceconfig-local-git--resource-group<res-group>-n<name># Access/Modify the code via gitgitclone'https://<username>:<password>@name.scm.azurewebsites.net/repo-name.git'## In my case the username was: $nameofthewebapp and the password some random chars## If you change the code and do a push, the app is automatically redeployed
Kupata ufikiaji kwenye kontena ya Docker na programu ya wavuti kupitia ssh:
# Get ssh sessionazwebappcreate-remote-connection--subscription<SUBSCRIPTION-ID>--resource-group<RG-NAME>-n<APP-SERVICE-NAME>## If successfull you will get a message such as:#Verifying if app is running....#App is running. Trying to establish tunnel connection...#Opening tunnel on port: 39895#SSH is available { username: root, password: Docker! }## So from that machine ssh into that port (you might need generate a new ssh session to the jump host)sshroot@127.0.0.1-p39895
Taarifa Msingi za Programu za Kazi
Azure Functions ni suluhisho lisilo na seva ambalo linakuruhusu kuandika msimbo mdogo, kudumisha miundombinu kidogo, na kuokoa gharama. Badala ya kuhangaika kuhusu kupeleka na kudumisha seva, miundombinu ya wingu hutoa rasilimali zote zilizosasishwa zinazohitajika kuendesha programu zako.
Katika portal ya Azure, ushirikiano kati ya Azure Functions na Azure API Management unarahisishwa, kuruhusu vifaa vya kazi vya kichocheo cha HTTP kuwekwa wazi kama API za REST. APIs zilizowekwa wazi kwa njia hii zinaelezewa kwa kutumia ufafanuzi wa OpenAPI, kutoa kiolesura cha kawaida, bila kujali lugha, kwa APIs za RESTful.
Programu za Kazi zinasaidia Vitambulisho Vilivyosimamiwa.
Zaidi ya hayo, Programu ya Kazi inaweza kuwa na vipengele fulani vinavyohitaji viwango fulani vya uwakiki, kama "msimamizi" au "anonym". Mshambuliaji anaweza kujaribu kupata ufikiaji wa vifaa vya kazi vinavyoruhusiwa kwa anonym ili kudukua vizuizi na kupata ufikiaji wa data au utendaji wenye hisia.