IdentifiantMot de passe
Loading...
Mot de passe oublié ?Je m'inscris ! (gratuit)
Navigation

Inscrivez-vous gratuitement
pour pouvoir participer, suivre les réponses en temps réel, voter pour les messages, poser vos propres questions et recevoir la newsletter

IGN API Géoportail Discussion :

cle choisirgeoportail de nouveau plus valide ?


Sujet :

IGN API Géoportail

  1. #21
    Nouveau Candidat au Club
    Femme Profil pro
    Chercheur en informatique
    Inscrit en
    Novembre 2020
    Messages
    16
    Détails du profil
    Informations personnelles :
    Sexe : Femme
    Localisation : France, Gironde (Aquitaine)

    Informations professionnelles :
    Activité : Chercheur en informatique
    Secteur : High Tech - Éditeur de logiciels

    Informations forums :
    Inscription : Novembre 2020
    Messages : 16
    Points : 0
    Points
    0
    Par défaut
    Bonjour,
    merci pour votre réponse

    Le code *curl* a t-il une signification particulière, ou peut-on mettre ce que l'on veut dans le user-agent ? pourquoi est-ce mieux que le referer ?

    Cordialement
      0  0

  2. #22
    Membre actif Avatar de azarzelli
    Homme Profil pro
    Analyse système
    Inscrit en
    Septembre 2020
    Messages
    136
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France, Paris (Île de France)

    Informations professionnelles :
    Activité : Analyse système

    Informations forums :
    Inscription : Septembre 2020
    Messages : 136
    Points : 267
    Points
    267
    Par défaut
    Le User-Agent est une en-tête de la requête envoyée au service, qui identifie le programme qui a fait la requête. Étant donné que vous utilisez curl, je propose comme sécurisation user-agent *curl*, les étoiles étant des métacaractères (en anglais, wildcard ou joker) permettant à l'user-agent d'avoir des éléments avant et après la chaine de caractères "curl".

    Cela n'est pas forcément mieux que le referer en fonction des usages. Une courte liste d'exemples d'application des sécurisations est présente sur le site géoservices à cette adresse : https://geoservices.ign.fr/documenta...r-ma-cl%C3%A9-

    Cordialement,
      0  0

  3. #23
    Membre actif Avatar de azarzelli
    Homme Profil pro
    Analyse système
    Inscrit en
    Septembre 2020
    Messages
    136
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France, Paris (Île de France)

    Informations professionnelles :
    Activité : Analyse système

    Informations forums :
    Inscription : Septembre 2020
    Messages : 136
    Points : 267
    Points
    267
    Par défaut
    ERRATUM:

    En fait, je me suis trompé ! Afin d'utiliser le métacaractère correctement, il faut le faire avec un sécurisation pas user agent avec la valeur `.*curl.*`. Désolé de vous avoir induite en erreur !
      0  0

  4. #24
    Nouveau Candidat au Club
    Femme Profil pro
    Chercheur en informatique
    Inscrit en
    Novembre 2020
    Messages
    16
    Détails du profil
    Informations personnelles :
    Sexe : Femme
    Localisation : France, Gironde (Aquitaine)

    Informations professionnelles :
    Activité : Chercheur en informatique
    Secteur : High Tech - Éditeur de logiciels

    Informations forums :
    Inscription : Novembre 2020
    Messages : 16
    Points : 0
    Points
    0
    Par défaut
    Bonjour,
    merci pour votre message.
    si je comprends bien il faut demander à IGN une clé user-agent .*curl.* qui permettra de s'authentifier avec par exemple curl7.32 ou thecurl_7.37 ?

    Mais, si par exemple je demande à IGN une clé user-agent *curltoto est-que IGN va accepter ce user agent comme le mien (bien sur ce serait donc un user agent unique puisqu'il n'y a pas de meta caractères .* dans cette chaine *curltoto ?

    Cordialement,
      0  0

  5. #25
    Membre habitué Avatar de xavier_dmz
    Homme Profil pro
    Développeur informatique
    Inscrit en
    Juin 2016
    Messages
    77
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France, Val de Marne (Île de France)

    Informations professionnelles :
    Activité : Développeur informatique
    Secteur : Service public

    Informations forums :
    Inscription : Juin 2016
    Messages : 77
    Points : 156
    Points
    156
    Par défaut
    Bonjour,

    Comme précisé par azarzelli, le user-agent n'est pas un moyen d'authentification d'un utilisateur, mais d'identification de l'application utilisée pour envoyer la requête.

    Pour développer :
    • "identification" = on cherche à savoir qui ou quoi nous contacte. Dans le cas du user-agent, on cherche donc à savoir quelle aplication est utilisée pour envoyer la requête. Ici, il s'agit de l'outil "curl".
    • "authentification" = on cherche à s'assurer que le client qui nous contacte est bien celui qu'il prétend être. C'est un complément de l'identification, pas un synonyme. Ici il s'agit donc de vérifier que l'utilisateur de la clé est bien quelqu'un qui en connais les aramètres de sécurisation.


    Le user-agent, en terme d'authentification, permet juste de savoir si l'utilisateur de la clé utilise bien un outil prévu par le créateur de la clé.

    Plus de détails sur le sens des en-tête "User-Agent" et "Referer" sont aisément trouvable en cherchant sur internet, y compris sur https://www.developpez.com et ses forums. Après tout, il s'agit d'une norme commune du web. Ces informations vous permettrons probablement de mieux comprendre les réponses de mes collègues.
    Développeur au sein de l'écosystème "Géoportail" de l'IGN. (Institut national de l'information géographique et forestière.)
      2  0

  6. #26
    Nouveau Candidat au Club
    Femme Profil pro
    Chercheur en informatique
    Inscrit en
    Novembre 2020
    Messages
    16
    Détails du profil
    Informations personnelles :
    Sexe : Femme
    Localisation : France, Gironde (Aquitaine)

    Informations professionnelles :
    Activité : Chercheur en informatique
    Secteur : High Tech - Éditeur de logiciels

    Informations forums :
    Inscription : Novembre 2020
    Messages : 16
    Points : 0
    Points
    0
    Par défaut
    Bonjour,
    merci beaucoup pour vos explications !

    j'ai reçue une clé d'IGN pour user-agent, mais ca ne fonctionne toujours pas !!!!
    Avez-vous une idée...
    Voici la trace :
    == Info: Trying 192.134.136.9:443...
    == Info: TCP_NODELAY set
    == Info: Connected to wxs.ign.fr (192.134.136.9) port 443 (#0)
    == Info: ALPN, offering h2
    == Info: ALPN, offering http/1.1
    == Info: successfully set certificate verify locations:
    == Info: CAfile: Y:\map\map\map\bin\Debug\curl\bin\curl-ca-bundle.crt
    CApath: none
    => Send SSL data, 5 bytes (0x5)
    0000: .....
    == Info: TLSv1.3 (OUT), TLS handshake, Client hello (1):
    => Send SSL data, 512 bytes (0x200)
    0000: ......q...)...p.m[I.K.n-.....Z.....mK. $.il...`.;...........ok.8
    0040: ..@...U.>.......,.0.........+./...$.(.k.#.'.g.....9.....3.....=.
    0080: <.5./.....u.........wxs.ign.fr........................3t........
    00c0: .h2.http/1.1.........1.....0....................................
    0100: .............+............-.....3.&.$... $<&.?...xd!E.,.....d.T.
    0140: r...q...>.......................................................
    0180: ................................................................
    01c0: ................................................................
    <= Recv SSL data, 5 bytes (0x5)
    0000: ....]
    == Info: TLSv1.3 (IN), TLS handshake, Server hello (2):
    <= Recv SSL data, 93 bytes (0x5d)
    0000: ...Y..}......e..O."\`....q.....o.|.... [i...a.v....i-.E.F.&...x~
    0040: ".xF.L../....................
    <= Recv SSL data, 5 bytes (0x5)
    0000: .....
    == Info: TLSv1.2 (IN), TLS handshake, Certificate (11):
    <= Recv SSL data, 3853 bytes (0xf0d)
    0000: ..........0...0.............d.(..s.!....w.0...*.H........0}1.0..
    0040: .U....FR1.0...U....DHIMYOTIS1.0...U....0002 481463081000361.0...
    0080: U.a..NTRFR-481463081000361.0...U....Certigna Services CA0...2003
    00c0: 16131526Z..220316131526Z0..1.0...U....FR1.0...U....ST MANDE1F0D.
    0100: .U...=INSTITUT NATIONAL DE L'INFORMATION GEOGRAPHIQUE ET FORESTI
    0140: ERE1.0...U....0002 180067019004301.0...U....wxs.ign.fr1.0...U...
    0180: .S156240070.."0...*.H.............0..............S........$..s.u
    01c0: ..#...$3E....G2......I$..j.8.[.....1.$.@..g..!..vU.......C..q..
    0200: ....g.`.....N.-..5=..|....w.. ..<5.$/.....EX|... ...}ej.].*.]...
    0240: .........Fg.^e{.J......[....jy.F.bW..'+..Q...1/^|...6.........
    0280: .0..q-w..ez..t7.(.. C.~.5I.....>(Q.s.D...{7........(0..$0...U...
    02c0: .0.0...U...........0...U.%..0...+.......0e..U...^0\0+.).'.%http:
    0300: //crl.certigna.fr/servicesca.crl0-.+.).'http://crl.dhimyotis.com
    0340: /servicesca.crl0....+..........0..06..+.....0..*http://autorite.
    0380: certigna.fr/servicesca.der08..+.....0..,http://autorite.dhimyoti
    03c0: s.com/servicesca.der0...+.....0.."http://servicesca.ocsp.certign
    0400: a.fr00..+.....0..$http://servicesca.ocsp.dhimyotis.com0...U.....
    0440: ...;t.m9.....c.9(..4.0...U.#..0.......K7........N.4\.0...U....0
    0480: ...wxs.ign.fr0T..U. .M0K0...g.....0?..*.z..1.....000...+........
    04c0: "https://www.certigna.fr/autorites/0.....+.....y..............w.
    0500: A...."FJ...:.B.^N1.....K.h..b......p.|.......H0F.!..j.AK.?&.....
    0540: ..'..Hy.f......k...!...t0..5....T./.Oo.&V.F.....T.4Ck.u.oSv.1.1
    0580: .....Q..w.......).....7.....p.|.".....F0D. Dz..`yU ..y.ua.......
    05c0: i.Q.t....O+. Z...3".....fm.S.&.2oe.Xr....T....u."EE.YU$V.?./..m.
    0600: .#&c..K]..\n......p.|.......F0D. 3.....T..A7r.]..|..=k:a.`.Y...
    0640: '.. lo"...(..} .X&..T.b...rj"..).-...v.)y...99!.Vs.c.w..W}.`...M
    0680: ]&\%].....p.| ......G0E.!....!..O...w......"1....f../..mp.. )..<
    06c0: .......$.ts..1$|.........`..0...*.H...............6In..o...}S...
    0700: 4.....*..9......Q.)o.....N...4.<'..1#:B0.p.._.m.....c.<...xT.S N
    0740: .....Qe.B.M.]...y.2.8....bJ.!.q...\3f..*...1....)Y...K.!.H~....
    0780: ....=2.R...~.1..u0..%KB...H.c...c..-...N..1...r...#.$.....atB..
    07c0: ...$..)l....v0LW.z.2..[Z.6..c.ce..P'.n..q..9..{..Y.c.....j|.k...
    0800: .Q...J..{.a.`..T.!...Pf..[;}g.7.-D.6..a....../X..dg|M.x0...g....
    0840: 7l..@.\...wy6...&R..P..*.:.+.../O.<.D........[.Q..".7..........
    0880: /.y...rtL.......,7....H...;.<3....W..t.,)..........j~..^.v!..q.;
    08c0: .......mX....6... 3.....h....K.y.`cp..`r`[....m....0...0........
    0900: ..o..(.....[...sg.0...*.H........041.0...U....FR1.0...U....Dhimy
    0940: otis1.0...U....Certigna0...151125113352Z..251122113352Z0}1.0...U
    0980: ....FR1.0...U....DHIMYOTIS1.0...U....0002 481463081000361.0...U.
    09c0: a..NTRFR-481463081000361.0...U....Certigna Services CA0.."0...*.
    0a00: H.............0.............X...W.i77.p~....zm.A.=......f$..2...
    0a40: -.t..5}.Q...Ue..s.....R...U..YV....3.......V..#z...c...F1.;<.qa.
    0a80: ....'M.......T...8../.:&z../-.j3......1Ze$T-.c...Z...3?....mr..B
    0ac0: .xx.O.&!.Z.......;Ad.5Zxw_.gn3<0D..]..Om!.F...#{N...2..++.....{.
    0b00: ....'`.t!...eu..A....-/..u..!isb.k[...6.n...h<..5.37...Ye....p".
    0b40: uk..UU7.,..Z.R$zD*....Q.>}.c/.E......z.P).J..Nln.Mc.....)K...F..
    0b80: ...q........A...gD..."...^a....><...Z....q.;....@0^CNi/[..."....
    0bc0: ........1YT.....).....*>$...R.4..<...F..#.B...<s.C..[..1.......|
    0c00: (.}...Pm...h.Y.0................0...0...U.......0.......0...U...
    0c40: ........0...U..........K7........N.4\.0d..U.#.]0[.....A9..$Y...
    0c80: R.E.Z9...8.6041.0...U....FR1.0...U....Dhimyotis1.0...U....Certig
    0cc0: na.........H.0I..U. .B0@0>..*.z..1....000...+........"https://ww
    0d00: w.certigna.fr/autorites/0|..+........p0n04..+.....0..(http://aut
    0d40: orite.certigna.fr/certigna.der06..+.....0..*http://autorite.dhim
    0d80: yotis.com/certigna.der0a..U...Z0X0).'.%.#http://crl.certigna.fr/
    0dc0: certigna.crl0+.).'.%http://crl.dhimyotis.com/certigna.crl0...*.H
    0e00: .............b.....c.U.4q3>.=...O........~t}8.3.l..m..**p.P71o.B
    0e40: ;...r.....?_.6JQ.t.x.&...8..,F.W....D.....d..1..(.*...!{....Y..
    0e80: @..~]+4.......v.......X.@..c.u...A$8....mkq.C.t..2.s..cs.{'K...>
    0ec0: .(....*.L.KL..}\3.......Xc.|x...).*.Z.u....I...FG.g.b....9..f..
    0f00: ...f....... .
    <= Recv SSL data, 5 bytes (0x5)
    0000: ....M
    == Info: TLSv1.2 (IN), TLS handshake, Server key exchange (12):
    <= Recv SSL data, 333 bytes (0x14d)
    0000: ...I...A........H.W2f%kk.a....c.MA..x....;..a...P....i......V%Qb
    0040: ..l..............M@9.S......J...|.c3.#.+....N........@.o.u.....$
    0080: ........d<..q..kNf.+.b94w}7._..=..R.|D.L.k.....MB.#....vw.}.\..
    00c0: .U.n......#..".h.a3......T}.!..m...k.Y;:@.nz.Y.P.........=X.....
    0100: .lo.amn....?..6..........e4.7.m.......Xw....D.....8..'..7..O....
    0140: .U,.>.+W...[.
    <= Recv SSL data, 5 bytes (0x5)
    0000: .....
    == Info: TLSv1.2 (IN), TLS handshake, Server finished (14):
    <= Recv SSL data, 4 bytes (0x4)
    0000: ....
    => Send SSL data, 5 bytes (0x5)
    0000: ....F
    == Info: TLSv1.2 (OUT), TLS handshake, Client key exchange (16):
    => Send SSL data, 70 bytes (0x46)
    0000: ...BA.&..N...s*C..(.7..0....o...k.BJ.$.udn....l.......&!7|.J&<..
    0040: B:...U
    => Send SSL data, 5 bytes (0x5)
    0000: .....
    == Info: TLSv1.2 (OUT), TLS change cipher, Change cipher spec (1):
    => Send SSL data, 1 bytes (0x1)
    0000: .
    => Send SSL data, 5 bytes (0x5)
    0000: ....(
    == Info: TLSv1.2 (OUT), TLS handshake, Finished (20):
    => Send SSL data, 16 bytes (0x10)
    0000: .....r..r..(/...
    <= Recv SSL data, 5 bytes (0x5)
    0000: .....
    <= Recv SSL data, 5 bytes (0x5)
    0000: ....(
    == Info: TLSv1.2 (IN), TLS handshake, Finished (20):
    <= Recv SSL data, 16 bytes (0x10)
    0000: ....N.95`.*u|...
    == Info: SSL connection using TLSv1.2 / ECDHE-RSA-AES128-GCM-SHA256
    == Info: ALPN, server did not agree to a protocol
    == Info: Server certificate:
    == Info: subject: C=FR; L=ST MANDE; O=INSTITUT NATIONAL DE L'INFORMATION GEOGRAPHIQUE ET FORESTIERE; OU=0002 18006701900430; CN=wxs.ign.fr; serialNumber=S15624007
    == Info: start date: Mar 16 13:15:26 2020 GMT
    == Info: expire date: Mar 16 13:15:26 2022 GMT
    == Info: subjectAltName: host "wxs.ign.fr" matched cert's "wxs.ign.fr"
    == Info: issuer: C=FR; O=DHIMYOTIS; OU=0002 48146308100036; organizationIdentifier=NTRFR-48146308100036; CN=Certigna Services CA
    == Info: SSL certificate verify ok.
    => Send SSL data, 5 bytes (0x5)
    0000: ....2
    => Send header, 282 bytes (0x11a)
    0000: GET /ici il y a la clé recu d'IGN..../geoportail/wmts?SERVICE=WMTS&REQUE
    0040: ST=GetTile&VERSION=1.0.0&LAYER=GEOGRAPHICALGRIDSYSTEMS.MAPS&STYL
    0080: E=normal&TILEMATRIXSET=PM&TILEMATRIX=14&TILEROW=5650&TILECOL=832
    00c0: 2&FORMAT=image/jpeg HTTP/1.1
    00de: Host: wxs.ign.fr
    00f0: Accept: */*
    00fd: User-Agent:*curlpirilampo
    0118:
    <= Recv SSL data, 5 bytes (0x5)
    0000: .....
    == Info: Mark bundle as not supporting multiuse
    <= Recv header, 24 bytes (0x18)
    0000: HTTP/1.1 403 Forbidden
    <= Recv header, 15 bytes (0xf)
    0000: Server: nginx
    <= Recv header, 37 bytes (0x25)
    0000: Date: Mon, 22 Feb 2021 17:30:52 GMT
    <= Recv header, 31 bytes (0x1f)
    0000: Content-Type: application/xml
    <= Recv header, 28 bytes (0x1c)
    0000: Transfer-Encoding: chunked
    <= Recv header, 43 bytes (0x2b)
    0000: wl-original-content-type: application/xml
    <= Recv header, 32 bytes (0x20)
    0000: Access-Control-Allow-Origin: *
    <= Recv header, 41 bytes (0x29)
    0000: Access-Control-Allow-Methods: GET, POST
    <= Recv header, 31 bytes (0x1f)
    0000: Access-Control-Max-Age: 43200
    <= Recv header, 2 bytes (0x2)
    0000:
    <= Recv data, 160 bytes (0xa0)
    0000: 8d
    0004: <ExceptionReport><Exception exceptionCode="MissingRights">No rig
    0044: hts for this ressource or ressource does not exist</Exception></
    0084: ExceptionRepo
    0093: 3
    0096: rt>
    009b: 0
    009e:
    == Info: Connection #0 to host wxs.ign.fr left intact
      0  0

  7. #27
    Membre actif Avatar de azarzelli
    Homme Profil pro
    Analyse système
    Inscrit en
    Septembre 2020
    Messages
    136
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France, Paris (Île de France)

    Informations professionnelles :
    Activité : Analyse système

    Informations forums :
    Inscription : Septembre 2020
    Messages : 136
    Points : 267
    Points
    267
    Par défaut
    Bonjour,

    Je pense que le sujet initial a été épuisé. Je vous invite à me contacter en message privé, avec votre clé, pour essayer de régler le problème. Je ferme le sujet.

    Cordialement,
      0  0

Discussion fermée
Cette discussion est résolue.
Page 2 sur 2 PremièrePremière 12

Discussions similaires

  1. cle choisirgeoportail plus valide ?
    Par developIGN dans le forum IGN API Géoportail
    Réponses: 4
    Dernier message: 21/11/2020, 18h55
  2. [XL-2007] nouveau bouton validation
    Par pilounet54 dans le forum Macros et VBA Excel
    Réponses: 0
    Dernier message: 19/03/2012, 21h43
  3. Changement de composant, XP pro plus valide
    Par Fleur-Anne.Blain dans le forum Windows XP
    Réponses: 4
    Dernier message: 06/01/2007, 14h47
  4. Montage cle USB qui veut plus marcher
    Par pierabobl dans le forum Matériel
    Réponses: 10
    Dernier message: 07/06/2006, 14h09

Partager

Partager
  • Envoyer la discussion sur Viadeo
  • Envoyer la discussion sur Twitter
  • Envoyer la discussion sur Google
  • Envoyer la discussion sur Facebook
  • Envoyer la discussion sur Digg
  • Envoyer la discussion sur Delicious
  • Envoyer la discussion sur MySpace
  • Envoyer la discussion sur Yahoo