зеркало из
				https://github.com/iharh/notes.git
				synced 2025-10-31 21:56:08 +02:00 
			
		
		
		
	m
Этот коммит содержится в:
		
							родитель
							
								
									c56d5315f5
								
							
						
					
					
						Коммит
						e702b2085f
					
				| @ -29,6 +29,71 @@ private ArrayList<TokenCredential> getCredentialsChain() { | |||||||
|     return output; |     return output; | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
|  | private static final class AuthenticatedImpl implements Authenticated { | ||||||
|  |   private final HttpPipeline httpPipeline; | ||||||
|  |   private final ResourceManager.Authenticated resourceManagerAuthenticated; | ||||||
|  |   private AuthorizationManager authorizationManager; | ||||||
|  |   private String tenantId; | ||||||
|  |   private String subscriptionId; | ||||||
|  |   private final AzureEnvironment environment; | ||||||
|  | 
 | ||||||
|  |   private AuthenticatedImpl(HttpPipeline httpPipeline, AzureProfile profile) { | ||||||
|  |       // !!! | ||||||
|  |       this.resourceManagerAuthenticated = ResourceManager.authenticate(httpPipeline, profile); | ||||||
|  |       ... | ||||||
|  |   } | ||||||
|  |   ... | ||||||
|  | } | ||||||
|  | !!!   | ||||||
|  | IdentityClient.authenticateWith... | ||||||
|  | ??? ManagedIdentityCredential::getToken, ... | ||||||
|  | 
 | ||||||
|  | 
 | ||||||
|  | az account get-access-token --output json --resource https://management.core.windows.net/ | ||||||
|  | 
 | ||||||
|  | IdentityClientBase | ||||||
|  |     AccessToken getTokenFromAzureCLIAuthentication(StringBuilder azCommand) { | ||||||
|  |         ... | ||||||
|  |         Map<String, String> objectMap = SERIALIZER_ADAPTER.deserialize(processOutput, Map.class, | ||||||
|  |             SerializerEncoding.JSON); | ||||||
|  |         String accessToken = objectMap.get("accessToken"); | ||||||
|  |         String time = objectMap.get("expiresOn"); | ||||||
|  |         String timeToSecond = time.substring(0, time.indexOf(".")); | ||||||
|  |         String timeJoinedWithT = String.join("T", timeToSecond.split(" ")); | ||||||
|  |         OffsetDateTime expiresOn = LocalDateTime.parse(timeJoinedWithT, DateTimeFormatter.ISO_LOCAL_DATE_TIME) | ||||||
|  |             .atZone(ZoneId.systemDefault()) | ||||||
|  |             .toOffsetDateTime().withOffsetSameInstant(ZoneOffset.UTC); | ||||||
|  |         token = new AccessToken(accessToken, expiresOn); | ||||||
|  |         ... | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  | sdk/core/azure-core/src/main/java/com/azure/core/credential/SimpleTokenCache.java | ||||||
|  | 64:                    } else if (cache == null || cache.isExpired()) { | ||||||
|  | 112:                } else if (cache != null && !cache.isExpired()) { | ||||||
|  | 
 | ||||||
|  | sdk/core/azure-core/src/main/java/com/azure/core/implementation/AccessTokenCache.java | ||||||
|  | !!!   this.tokenSupplierSync = () -> tokenCredential.getTokenSync(this.tokenRequestContext); | ||||||
|  | 
 | ||||||
|  | sdk/identity/azure-identity/src/main/java/com/azure/identity/AzureCliCredential.java | ||||||
|  |   getTokenSync | ||||||
|  | sdk/identity/azure-identity/src/main/java/com/azure/identity/EnvironmentCredential.java | ||||||
|  |   https://learn.microsoft.com/en-us/azure/developer/java/spring-framework/configure-spring-boot-starter-java-app-with-azure-active-directory | ||||||
|  |   ClientSecretCredential | ||||||
|  |   ClientCertificateCredential | ||||||
|  |   UsernamePasswordCredential | ||||||
|  | sdk/identity/azure-identity/src/main/java/com/azure/identity/ManagedIdentityCredential.java | ||||||
|  |   !!! need clientId of user-assigned managed identity | ||||||
|  |   * @param clientId the client id of user assigned identity   or app registration (when working with AKS pod-identity). | ||||||
|  | 
 | ||||||
|  | 
 | ||||||
|  | 
 | ||||||
|  | ExpringTask | ||||||
|  |     tokenCache.fetchFreshToken | ||||||
|  |     getTokenRefresher | ||||||
|  |     Supplier<String> tokenRefresher = tokenRefreshOptions.getTokenRefresherSync(); | ||||||
|  | 
 | ||||||
|  | CommunicationTokenRefreshOptions ?? never created | ||||||
|  | 
 | ||||||
| managed ids | managed ids | ||||||
| https://learn.microsoft.com/en-us/azure/app-service/overview-managed-identity | https://learn.microsoft.com/en-us/azure/app-service/overview-managed-identity | ||||||
| https://learn.microsoft.com/en-us/azure/active-directory/managed-identities-azure-resources/ | https://learn.microsoft.com/en-us/azure/active-directory/managed-identities-azure-resources/ | ||||||
|  | |||||||
| @ -1,5 +0,0 @@ | |||||||
| 2021 |  | ||||||
| https://linoxide.com/ssh-commands-in-linux-with-usage-examples/ |  | ||||||
| https://www.tecmint.com/ssh-security-best-practices/ |  | ||||||
| 2018 |  | ||||||
| https://habr.com/post/425637/ |  | ||||||
| @ -1,12 +0,0 @@ | |||||||
| 2022 |  | ||||||
| LearnLinuxTV - Getting Started with OpenSSH Key Management of 23:30 |  | ||||||
|     https://www.youtube.com/watch?v=GxRu35fy-oY |  | ||||||
| 2020 |  | ||||||
| LearnLinuxTV - OpenSSH Full Guide - Everything you need to get started! of 1:27:59 |  | ||||||
|     https://www.youtube.com/watch?v=YS5Zh7KExvE |  | ||||||
| 2019 |  | ||||||
| LearnLinuxTV - 3 Important Tweaks for Improving OpenSSH Security on Your Cloud Instance of 39:01 |  | ||||||
|     https://www.youtube.com/watch?v=xVW1fGRlRkE |  | ||||||
| 2015 |  | ||||||
| Gotbletu - Remote Desktop Software |  | ||||||
|     https://www.youtube.com/playlist?list=PLqv94xWU9zZ2v9wasSAH6Qo_icOPimwn1 |  | ||||||
| @ -93,6 +93,9 @@ Hillard - Practices of the Python Pro | |||||||
|     25154F9C11E4A5E20CFB9FDF07160D79 |     25154F9C11E4A5E20CFB9FDF07160D79 | ||||||
| 2019 | 2019 | ||||||
| Danjou - Serious Python | Danjou - Serious Python | ||||||
|  |     876F4597C2CCEAF18633898EEE4ABDAD | ||||||
|  |     B80553F48DA6D3643A5B9874D1C90AB8 | ||||||
|  |     9CBE93B588D4CD54CD120C02A7945A9D | ||||||
| Fedorov - Python Programming ru | Fedorov - Python Programming ru | ||||||
| Kapil - Clean Python | Kapil - Clean Python | ||||||
|     B3FE71F8C3E248D927B19A6628E3BD62 |     B3FE71F8C3E248D927B19A6628E3BD62 | ||||||
|  | |||||||
| @ -1,9 +1,13 @@ | |||||||
| 2023 | 2023 | ||||||
| https://www.stationx.net/ssh-commands-cheat-sheet/ | https://www.stationx.net/ssh-commands-cheat-sheet/ | ||||||
|     ! cool |     ! cool | ||||||
|  | 2021 | ||||||
|  | https://linoxide.com/ssh-commands-in-linux-with-usage-examples/ | ||||||
|  | https://www.tecmint.com/ssh-security-best-practices/ | ||||||
| 2022 | 2022 | ||||||
| https://habr.com/ru/company/ruvds/blog/676596/ | https://habr.com/ru/company/ruvds/blog/676596/ | ||||||
| 2019 | 2019 | ||||||
| https://proglib.io/p/ssh-tunnels/ | https://proglib.io/p/ssh-tunnels/ | ||||||
| 2018 | 2018 | ||||||
| https://habr.com/post/425637/ | https://habr.com/post/425637/ | ||||||
|  | http://www.thegeekstuff.com/2008/11/3-steps-to-perform-ssh-login-without-password-using-ssh-keygen-ssh-copy-id/ | ||||||
|  | |||||||
							
								
								
									
										3
									
								
								security/ssh/docs/books.txt
									
									
									
									
									
										Обычный файл
									
								
							
							
						
						
									
										3
									
								
								security/ssh/docs/books.txt
									
									
									
									
									
										Обычный файл
									
								
							| @ -0,0 +1,3 @@ | |||||||
|  | 2005 | ||||||
|  | Barrett - SSH The Secure Shell 2nd ed | ||||||
|  |     961787C66EF4F3856D42BA250F3E58C9 | ||||||
| @ -1,3 +1,12 @@ | |||||||
| 2021 | 2022 | ||||||
|  | LearnLinuxTV - Getting Started with OpenSSH Key Management of 23:30 | ||||||
|  |     https://www.youtube.com/watch?v=GxRu35fy-oY | ||||||
|  | 2020 | ||||||
| LearnLinuxTV - OpenSSH Full Guide - Everything you need to get started! of 1:27:59 | LearnLinuxTV - OpenSSH Full Guide - Everything you need to get started! of 1:27:59 | ||||||
|     https://www.youtube.com/watch?v=YS5Zh7KExvE |     https://www.youtube.com/watch?v=YS5Zh7KExvE | ||||||
|  | 2019 | ||||||
|  | LearnLinuxTV - 3 Important Tweaks for Improving OpenSSH Security on Your Cloud Instance of 39:01 | ||||||
|  |     https://www.youtube.com/watch?v=xVW1fGRlRkE | ||||||
|  | 2015 | ||||||
|  | Gotbletu - Remote Desktop Software | ||||||
|  |     https://www.youtube.com/playlist?list=PLqv94xWU9zZ2v9wasSAH6Qo_icOPimwn1 | ||||||
|  | |||||||
| @ -1,29 +1,14 @@ | |||||||
| https://wiki.archlinux.org/index.php/SSH_keys |  | ||||||
| 
 |  | ||||||
| http://www.ibm.com/developerworks/library/l-keyc/ |  | ||||||
| http://www.ibm.com/developerworks/library/l-keyc2/ |  | ||||||
| http://www.ibm.com/developerworks/library/l-keyc3/ |  | ||||||
| 
 |  | ||||||
| http://serverfault.com/questions/241588/how-to-automate-ssh-login-with-password |  | ||||||
| 
 |  | ||||||
| http://www.thegeekstuff.com/2008/11/3-steps-to-perform-ssh-login-without-password-using-ssh-keygen-ssh-copy-id/ |  | ||||||
| 
 |  | ||||||
| ssh-copy-id -i ~/.ssh/id_rsa.pub user@host |  | ||||||
| 
 |  | ||||||
| 
 |  | ||||||
| ssh-keygen ... |  | ||||||
| ssh-copy-id <user>@<host> |  | ||||||
| -> ~/.ssh/authorized_keys |  | ||||||
| 
 |  | ||||||
| github ssh: | github ssh: | ||||||
| https://help.github.com/articles/generating-ssh-keys/ | https://help.github.com/articles/generating-ssh-keys/ | ||||||
| https://help.github.com/articles/working-with-ssh-key-passphrases/ | https://help.github.com/articles/working-with-ssh-key-passphrases/ | ||||||
| http://superuser.com/questions/441854/git-ssh-agent-not-working | http://superuser.com/questions/441854/git-ssh-agent-not-working | ||||||
| 
 | 
 | ||||||
| 
 | https://wiki.archlinux.org/index.php/SSH_keys | ||||||
| ssh-keygen -t rsa -b 4096 -C "your_email@example.com" -f <some-file> | ssh-keygen -t rsa -b 4096 -C "your_email@example.com" -f <some-file> | ||||||
|     will generate <some-file> with a pvt-key and <some-file>.pub with a pub-key |     will generate <some-file> with a pvt-key and <some-file>.pub with a pub-key | ||||||
| 
 | ssh-copy-id <user>@<host> | ||||||
|  | -> ~/.ssh/authorized_keys | ||||||
|  | ssh-copy-id -i ~/.ssh/id_rsa.pub user@host | ||||||
| 
 | 
 | ||||||
| PVT KEYS: | PVT KEYS: | ||||||
| sudo chmod 0500 ~/.shh/id_rsa | sudo chmod 0500 ~/.shh/id_rsa | ||||||
| @ -31,9 +16,6 @@ sudo chmod 0500 ~/.shh/id_rsa | |||||||
| Multiple keys: | Multiple keys: | ||||||
| http://stackoverflow.com/questions/10455974/setting-up-ssh-keys-for-gibhub | http://stackoverflow.com/questions/10455974/setting-up-ssh-keys-for-gibhub | ||||||
| 
 | 
 | ||||||
| Legacy: |  | ||||||
| http://www.openssh.com/legacy.html |  | ||||||
| 
 |  | ||||||
| Password-protect key: | Password-protect key: | ||||||
| https://help.github.com/articles/working-with-ssh-key-passphrases/ | https://help.github.com/articles/working-with-ssh-key-passphrases/ | ||||||
| ssh-keygen -p -f /path-to/key-file | ssh-keygen -p -f /path-to/key-file | ||||||
		Загрузка…
	
	
			
			x
			
			
		
	
		Ссылка в новой задаче
	
	Block a user
	 Ihar Hancharenka
						Ihar Hancharenka